use run instead of compile, it describes an interpreter better

This commit is contained in:
Sebastian Hugentobler 2025-05-26 10:23:04 +02:00
parent 32e5e8a41a
commit 175f672dd6
Signed by: shu
SSH key fingerprint: SHA256:ppcx6MlixdNZd5EUM1nkHOKoyQYoJwzuQKXM6J/t66M
2 changed files with 4 additions and 4 deletions

View file

@ -14,7 +14,7 @@ pub struct Cli {
} }
#[derive(Args, Clone)] #[derive(Args, Clone)]
pub struct CompileConfig { pub struct RunConfig {
/// Path to Lox source file. /// Path to Lox source file.
#[arg(short, long)] #[arg(short, long)]
pub source: PathBuf, pub source: PathBuf,
@ -22,8 +22,8 @@ pub struct CompileConfig {
#[derive(Subcommand)] #[derive(Subcommand)]
pub enum Commands { pub enum Commands {
/// Compile a Lox source file. /// Run a Lox source file.
Compile(CompileConfig), Run(RunConfig),
/// Run a Lox REPL. /// Run a Lox REPL.
Repl, Repl,
} }

View file

@ -14,7 +14,7 @@ fn main() {
let cli = Cli::parse(); let cli = Cli::parse();
match &cli.command { match &cli.command {
Commands::Compile(compile_config) => { Commands::Run(compile_config) => {
if !&compile_config.source.exists() { if !&compile_config.source.exists() {
error!( error!(
"{} does not exist", "{} does not exist",