Removed todo when unknown token

This commit is contained in:
Erin 2021-06-11 18:34:34 +02:00 committed by ondra05
parent 3d7c89634e
commit 183c584e96

View file

@ -396,7 +396,12 @@ impl<'source> Parser<'source> {
len len
} }
Token::LeftCurly => None, Token::LeftCurly => None,
_ => todo!(), token => {
return Err(Error::new(
ErrorKind::UnexpectedToken(token),
self.lexer.span(),
))
}
}; };
let mut code: Vec<u8> = vec![]; let mut code: Vec<u8> = vec![];