Print tokens and parse

This commit is contained in:
greg 2015-07-18 14:50:26 -07:00
parent 3fdacf018e
commit b2e23bed86

View File

@ -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);