START OF COMPILER

This commit is contained in:
2024-10-11 17:31:03 -04:00
parent bb3a0ad113
commit de79445ede
39 changed files with 710 additions and 94 deletions

View File

@@ -1,17 +1,11 @@
#![feature(box_patterns)]
#![feature(const_unbounded_shifts)]
#![feature(unbounded_shifts)]
mod util;
mod v1;
mod v2;
mod compiler;
mod parser;
fn 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}");
v1::parse_file(&file);
// v2::parse_file(&file);
} else {
v1::run_stdin();
}
compiler::main();
}