Skip to content

Commit

Permalink
add: command::Command
Browse files Browse the repository at this point in the history
  • Loading branch information
kyu08 committed Nov 10, 2024
1 parent aa70064 commit 4eca8e1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/model/command.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use super::runner;

pub struct Command {
pub runner_type: runner::RunnerType,
pub command_name: String,
pub file_name: String,
pub line_number: u32,
}
1 change: 1 addition & 0 deletions src/model/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pub(super) mod command;
mod file_util;
pub(crate) mod histories;
pub(super) mod make;
Expand Down
5 changes: 5 additions & 0 deletions src/model/runner.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ use std::path::PathBuf;

use anyhow::Result;

pub enum RunnerType {
Make,
Pnpm,
}

// TODO: Use associated constants if possible.
// ref: https://doc.rust-lang.org/reference/items/associated-items.html#associated-constants
pub trait Runner
Expand Down

0 comments on commit 4eca8e1

Please sign in to comment.