From b2e23bed86d0c9fa56b46dedcf6beb7373d02c4e Mon Sep 17 00:00:00 2001 From: greg Date: Sat, 18 Jul 2015 14:50:26 -0700 Subject: [PATCH] Print tokens and parse --- src/main.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 5ff19dc..81a2db7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -33,8 +33,11 @@ fn repl() { let line = stdin.lock().read_line(&mut buf); match line { Ok(n) => { - let result = tokenize(&buf); - println!("Tokens: {:?}", result); + let tokens = tokenize(&buf); + println!("Tokens: {:?}", tokens); + + let ast = parse(tokens); + println!("AST: {:?}", ast); }, Err(err) => { println!("Error: {}", err);