diff --git a/src/parser.rs b/src/parser.rs index 31c695e6..2b078ad5 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -396,7 +396,12 @@ impl<'source> Parser<'source> { len } Token::LeftCurly => None, - _ => todo!(), + token => { + return Err(Error::new( + ErrorKind::UnexpectedToken(token), + self.lexer.span(), + )) + } }; let mut code: Vec = vec![];