START OF COMPILER
This commit is contained in:
16
src/main.rs
16
src/main.rs
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user