started lexer

This commit is contained in:
nora 2021-10-03 21:22:40 +02:00
parent 3eeafb574c
commit 0f7999cc0f
4 changed files with 295 additions and 0 deletions

8
src/lib.rs Normal file
View file

@ -0,0 +1,8 @@
mod lex;
mod parse;
pub fn run_program(program: &str) {
let lexer = lex::Lexer::lex(program);
let tokens: Result<Vec<_>, _> = lexer.collect();
println!("{:#?}", tokens);
}