diff options
Diffstat (limited to 'sloth/src/main.rs')
| -rw-r--r-- | sloth/src/main.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sloth/src/main.rs b/sloth/src/main.rs index 3a70197..1eb0ead 100644 --- a/sloth/src/main.rs +++ b/sloth/src/main.rs @@ -47,10 +47,12 @@ fn main() { let mut ast = AstParser::parse(tokens, global_symtable).unwrap(); if let Err(error) = analyze(&mut ast) { - eprintln!("Failed to compile code:"); - eprintln!("{error}"); + eprintln!("Error on line {}: {error}", error.line() + 1); + return; } + println!("{ast:#?}"); + // let graph = GraphBuilder::generate(&ast).unwrap(); // println!("{graph}"); } |
