why parser bad broken stupid

This commit is contained in:
nora 2022-03-25 22:10:38 +01:00
parent 8a52378d4d
commit 83676704e1
4 changed files with 127 additions and 79 deletions

View file

@ -17,10 +17,11 @@ pub fn parse(_str: &str, _file_name: PathBuf) -> Result<ast::File, ()> {
pub fn test() {
let lexer = Token::lexer(
"fn foo() {
1 + 5;
struct test {}
}",
"
fn main() {
if 1 { 5 + 5; }
}
",
);
let len = lexer.source().len();