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)]
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,
}

View file

@ -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",