Add heuristic to avoid treating x + +2
as increment
This commit is contained in:
parent
29a5c363c7
commit
4212835d99
3 changed files with 11 additions and 18 deletions
|
@ -269,6 +269,7 @@ impl<'a> Parser<'a> {
|
|||
|
||||
if self.prev_token == token::BinOp(token::Plus)
|
||||
&& self.token == token::BinOp(token::Plus)
|
||||
&& self.prev_token.span.between(self.token.span).is_empty()
|
||||
{
|
||||
let op_span = self.prev_token.span.to(self.token.span);
|
||||
// Eat the second `+`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue