You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
431 B

3 years ago
use std::fs::File;
use std::io::Read;
3 years ago
mod lexer;
mod parser;
3 years ago
fn main() -> std::io::Result<()> {
let mut file = File::open("examples/hello_world.sb")?;
3 years ago
let mut contents = String::new();
file.read_to_string(&mut contents)?;
let tokens = lexer::tokenize(&contents);
3 years ago
// let ast = parser::parse(tokens.into_iter());
let program = parser::parse(tokens).unwrap();
3 years ago
println!("{:#?}", program);
3 years ago
Ok(())
3 years ago
}