work
This commit is contained in:
+4
-8
@@ -1,11 +1,13 @@
|
||||
use crate::{
|
||||
io::CompilerOutput,
|
||||
parser::{Node, parse_root},
|
||||
parser::{Node, parse_file},
|
||||
parser_ir::parse_program,
|
||||
};
|
||||
|
||||
mod io;
|
||||
mod ir;
|
||||
mod parser;
|
||||
mod parser_ir;
|
||||
|
||||
fn main() {
|
||||
let mut args = std::env::args();
|
||||
@@ -14,15 +16,9 @@ fn main() {
|
||||
return;
|
||||
};
|
||||
let mut output = CompilerOutput::new();
|
||||
let root = parse_root(&path, &mut output);
|
||||
let root = parse_file(&path, &mut output);
|
||||
if let Some(root) = root {
|
||||
print!("{}", root.new_dsp());
|
||||
// for item in &root.items {
|
||||
// output.errors.push(io::CompilerMsg {
|
||||
// spans: vec![item.span],
|
||||
// msg: format!("hello"),
|
||||
// });
|
||||
// }
|
||||
}
|
||||
output.write(&mut std::io::stdout());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user