Fixed invalid spanning of UnexpectedToken in parse_expr

This commit is contained in:
Erin 2021-06-11 18:31:25 +02:00 committed by ondra05
parent 3bcef28843
commit 3d7c89634e

View file

@ -208,10 +208,7 @@ impl<'source> Parser<'source> {
start..self.lexer.span().end,
)),
Token::LeftParen => self.expr_flow(Token::RightParen),
t => Err(Error::new(
ErrorKind::UnexpectedToken(t),
start..self.lexer.span().end,
)),
t => Err(Error::new(ErrorKind::UnexpectedToken(t), self.lexer.span())),
}
}