From 175f672dd6c09c159f938c768be30454f1df6783 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Mon, 26 May 2025 10:23:04 +0200 Subject: [PATCH] use run instead of compile, it describes an interpreter better --- rust/rox/src/cli.rs | 6 +++--- rust/rox/src/main.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/rust/rox/src/cli.rs b/rust/rox/src/cli.rs index 30fcca9..b797c57 100644 --- a/rust/rox/src/cli.rs +++ b/rust/rox/src/cli.rs @@ -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, } diff --git a/rust/rox/src/main.rs b/rust/rox/src/main.rs index 5dda64e..32caf1a 100644 --- a/rust/rox/src/main.rs +++ b/rust/rox/src/main.rs @@ -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",