tvl-depot/users/tazjin/rlox/src/main.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
420 B
Rust
Raw Normal View History

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();
}
}