the lexer now works
This commit is contained in:
+6
-3
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user