forked from AbleScript/ablescript
Fixed invalid spanning of UnexpectedToken in parse_expr
This commit is contained in:
parent
f3c459f26e
commit
8dbf93caa5
|
@ -208,10 +208,7 @@ impl<'source> Parser<'source> {
|
||||||
start..self.lexer.span().end,
|
start..self.lexer.span().end,
|
||||||
)),
|
)),
|
||||||
Token::LeftParen => self.expr_flow(Token::RightParen),
|
Token::LeftParen => self.expr_flow(Token::RightParen),
|
||||||
t => Err(Error::new(
|
t => Err(Error::new(ErrorKind::UnexpectedToken(t), self.lexer.span())),
|
||||||
ErrorKind::UnexpectedToken(t),
|
|
||||||
start..self.lexer.span().end,
|
|
||||||
)),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue