summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 0579fc8..a8114ac 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -13,6 +13,7 @@ fn main() {
let stdin = io::stdin();
let mut handle = stdin.lock();
loop {
+ let mut translate = semantic::translate::Translate::new();
let mut input = String::new();
print!("taiga> ");
io::stdout().flush().unwrap();
@@ -21,7 +22,8 @@ fn main() {
let program = taiga::parse_Program(&input);
println!("{:?}", program);
if let Ok(program) = program {
- println!("{:?}", semantic::analysis::translate(&program));
+ let result = semantic::analysis::translate(&mut translate, &program);
+ println!("{:?}", result);
}
}
else {