24 lines
420 B
Rust
24 lines
420 B
Rust
|
use std::process;
|
||
|
use std::env;
|
||
|
|
||
|
fn run_file(_file: &str) {
|
||
|
unimplemented!("no file support yet")
|
||
|
}
|
||
|
|
||
|
fn run_prompt() {
|
||
|
unimplemented!("no prompt support yet")
|
||
|
}
|
||
|
|
||
|
fn main() {
|
||
|
let mut args = env::args();
|
||
|
|
||
|
if args.len() > 1 {
|
||
|
println!("Usage: rlox [script]");
|
||
|
process::exit(1);
|
||
|
} else if let Some(file) = args.next() {
|
||
|
run_file(&file);
|
||
|
} else {
|
||
|
run_prompt();
|
||
|
}
|
||
|
}
|