aboutsummaryrefslogtreecommitdiff
path: root/sloth/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'sloth/src/main.rs')
-rw-r--r--sloth/src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/sloth/src/main.rs b/sloth/src/main.rs
index 0e429b5..67f8f97 100644
--- a/sloth/src/main.rs
+++ b/sloth/src/main.rs
@@ -17,6 +17,7 @@ use std::{env, fs};
use compiler::Compiler;
use itertools::Itertools;
use lexer::Lexer;
+use parser::graph::GraphBuilder;
use parser::AstParser;
fn main() {
@@ -35,9 +36,12 @@ fn main() {
};
let tokens = Lexer::new(&source).collect_vec();
- let ast = AstParser::new(tokens).parse();
+ let ast = AstParser::parse(tokens).unwrap();
- Compiler::compile(ast).unwrap();
+ let graph = GraphBuilder::generate(&ast).unwrap();
+ println!("{graph}");
+
+ // Compiler::compile(ast).unwrap();
// let context = Context::create();
// let compiler = Compiler::new(&context);