the lexer now works

This commit is contained in:
2024-04-01 12:06:00 +02:00
parent e909e00144
commit 17b4ee7ef0
2 changed files with 85 additions and 126 deletions
+6 -3
View File
@@ -2,7 +2,10 @@ mod lexer;
use lexer::lex;
fn main() {
// let input = "-3.232313 + 4 * (10 - 2)";
let input = "test";
let mut tokens = lex(input);
let input = "int test() {}";
// let input = "test->xy";
let tokens = lex(input, true);
for token in tokens {
println!("{:?} {}", token.token_type, token.token_value);
}
}