use run instead of compile, it describes an interpreter better
This commit is contained in:
parent
32e5e8a41a
commit
175f672dd6
2 changed files with 4 additions and 4 deletions
|
@ -14,7 +14,7 @@ pub struct Cli {
|
|||
}
|
||||
|
||||
#[derive(Args, Clone)]
|
||||
pub struct CompileConfig {
|
||||
pub struct RunConfig {
|
||||
/// Path to Lox source file.
|
||||
#[arg(short, long)]
|
||||
pub source: PathBuf,
|
||||
|
@ -22,8 +22,8 @@ pub struct CompileConfig {
|
|||
|
||||
#[derive(Subcommand)]
|
||||
pub enum Commands {
|
||||
/// Compile a Lox source file.
|
||||
Compile(CompileConfig),
|
||||
/// Run a Lox source file.
|
||||
Run(RunConfig),
|
||||
/// Run a Lox REPL.
|
||||
Repl,
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ fn main() {
|
|||
let cli = Cli::parse();
|
||||
|
||||
match &cli.command {
|
||||
Commands::Compile(compile_config) => {
|
||||
Commands::Run(compile_config) => {
|
||||
if !&compile_config.source.exists() {
|
||||
error!(
|
||||
"{} does not exist",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue