This commit is contained in:
Dane Johnson 2024-11-18 22:15:52 -06:00
parent b5ee47d2c8
commit 7397ecc84b
2 changed files with 3 additions and 4 deletions

View File

@ -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),

View File

@ -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 {