Files
crafting-interpreters/rlox/src/main.rs

27 lines
303 B
Rust
Raw Normal View History

2023-03-29 20:07:31 +02:00
mod vm;
2023-04-12 12:46:24 +02:00
mod lc;
2023-03-29 20:03:16 +02:00
2023-04-12 12:46:24 +02:00
use std::env;
fn repl() {
}
fn run_file() {
}
2023-04-04 19:03:57 +02:00
2023-04-04 20:34:36 +02:00
fn main() {
2023-04-12 12:46:24 +02:00
let num_args = env::args().len();
lc::compile("print(1+2*3)");
if num_args == 1 {
repl();
} else if num_args == 2 {
run_file();
} else {
println!("Usage: rlox [path]");
}
2023-03-29 20:03:16 +02:00
}