update
This commit is contained in:
+6
-5
@@ -4,16 +4,17 @@ mod parser;
|
||||
use parser::parse;
|
||||
|
||||
fn main() {
|
||||
let input = "int main() {";
|
||||
let input = "int main() {}";
|
||||
println!("\n\n\n\n");
|
||||
// let input = "test->xy";
|
||||
let mut tokens = lex(input, false);
|
||||
let ast = *parse(&mut tokens);
|
||||
for t in tokens {
|
||||
println!("{:?}", t);
|
||||
}
|
||||
// for t in tokens {
|
||||
// println!("{:?}", t);
|
||||
// }
|
||||
let mut _x = 1;
|
||||
for a in ast {
|
||||
println!("{:?}: {:?}", a.type_, a.values);
|
||||
println!("{:?}: {:?}\n", a.type_, a.values);
|
||||
_x+=1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user