Removed todo when unknown token

This commit is contained in:
Erin 2021-06-11 18:34:34 +02:00 committed by ondra05
parent 8dbf93caa5
commit 76e5fb9043

View file

@ -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<u8> = vec![];