Initial commit
- Implemented basic lexer - No spans implemented yet - No real error handling yet
This commit is contained in:
23
plang2/src/main.rs
Normal file
23
plang2/src/main.rs
Normal file
@@ -0,0 +1,23 @@
|
||||
#![allow(dead_code, unused)]
|
||||
use plang2_lib::*;
|
||||
|
||||
fn main() {
|
||||
|
||||
let code = r#"
|
||||
// This is the main function
|
||||
fn main() {
|
||||
let a = 5465;
|
||||
let b = 8;
|
||||
let c = a + b;
|
||||
|
||||
print_int(c);
|
||||
}
|
||||
"#;
|
||||
|
||||
let mut lexer = Lexer::new(code);
|
||||
|
||||
let tokens = lexer.tokenize().unwrap();
|
||||
|
||||
println!("Tokens: \n{}\n", tokens);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user