Nitpicks
This commit is contained in:
parent
b5ee47d2c8
commit
7397ecc84b
@ -21,7 +21,6 @@ impl <'a> LexicalContext<'a> {
|
||||
is_tail: false,
|
||||
}
|
||||
}
|
||||
#[allow(dead_code)]
|
||||
fn new(parent: &'a LexicalContext<'a>) -> Self {
|
||||
LexicalContext {
|
||||
parent: Some(parent),
|
||||
|
@ -16,15 +16,15 @@ struct Cli {
|
||||
file: PathBuf,
|
||||
#[clap(short, long, help="Emit a parse tree")]
|
||||
parse: bool,
|
||||
#[clap(short, long, help="Cross-compile to ECMAScript")]
|
||||
#[clap(short, long, help="Cross compile to ECMAScript")]
|
||||
ecmascript: bool,
|
||||
#[clap(long, help="Only run the pre-processor")]
|
||||
#[clap(long, help="Run the preprocessor")]
|
||||
preprocess: bool,
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let cli = Cli::parse();
|
||||
let mut file = File::open(&cli.file).expect("Could not read file");
|
||||
let mut file = File::open(&cli.file).expect("Couldn't read file");
|
||||
let mut prgm = String::new();
|
||||
file.read_to_string(&mut prgm).unwrap();
|
||||
if cli.preprocess {
|
||||
|
Loading…
Reference in New Issue
Block a user