This commit is contained in:
2024-10-18 16:52:12 -04:00
parent b15a40c4d9
commit 14a4fb1ff9
22 changed files with 1672 additions and 77 deletions

View File

@@ -7,6 +7,13 @@ mod ir;
mod parser;
fn main() {
parser::main();
let arg = std::env::args_os().nth(1);
if let Some(path) = arg {
let file = std::fs::read_to_string(path).expect("failed to read file");
println!("{file}");
parser::parse_file(&file);
} else {
parser::run_stdin();
}
// compiler::main();
}