about summary refs log tree commit diff
path: root/users/tazjin/rlox/src/main.rs
blob: 3f173673a1776b456676627e1645d09a2df44f05 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
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();
    }
}