diff --git a/src/frontend/new_lexer.rs b/src/frontend/new_lexer.rs index d4702bf..a7838a3 100644 --- a/src/frontend/new_lexer.rs +++ b/src/frontend/new_lexer.rs @@ -126,10 +126,6 @@ pub fn lexer<'a>() -> impl Parser<'a, &'a str, Vec>>, ParserEr let comment = single_comment.or(multi_comment); - let recovery = - // filter current unknown token - none_of::<&str, &str, ParserError<'a, char>>(" \t\n\r").repeated(); - // tokens let token = choice(( keywords, @@ -144,8 +140,7 @@ pub fn lexer<'a>() -> impl Parser<'a, &'a str, Vec>>, ParserEr .map_with(| tok, extra| Spanned(tok, extra.span())) .padded_by(comment.repeated()) .padded() - .recover_with(skip_then_retry_until(recovery.ignored(), end())) - .map(| tok | { println!("{:?}", tok); tok}) + .recover_with(skip_then_retry_until(any().ignored(), end())) .repeated() .collect::>>>() } \ No newline at end of file