summaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 8976597..8264f97 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1,4 +1,5 @@
pub mod ast;
+pub mod semantic;
pub mod taiga;
use std::io::{self, BufRead, Write};
@@ -12,7 +13,11 @@ fn main() {
io::stdout().flush().unwrap();
if let Ok(n) = handle.read_line(&mut input) {
if n == 0 { break; }
- println!("{:?}", taiga::parse_Program(&input));
+ let program = taiga::parse_Program(&input);
+ println!("{:?}", program);
+ if let Ok(program) = program {
+ println!("{:?}", semantic::translate::translate(&program));
+ }
}
else {
break;