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