Assert the parser is at augmented assign token (#10269)
## Summary This PR updates fixes one of the `FIXME` comment to assert that the parser is at one of the possible augmented assignment token when parsing an augmented assignment statement. ## Test Plan 1. Add valid test cases for all the possible augmented assignment tokens 2. Add invalid test cases similar to assignment statement
This commit is contained in:
@@ -1,3 +1,18 @@
|
||||
x += 1
|
||||
x.y += (1, 2, 3)
|
||||
x[y] += (1, 2, 3)
|
||||
|
||||
# All possible augmented assignment tokens
|
||||
x += 1
|
||||
x -= 1
|
||||
x *= 1
|
||||
x /= 1
|
||||
x //= 1
|
||||
x %= 1
|
||||
x **= 1
|
||||
x &= 1
|
||||
x |= 1
|
||||
x ^= 1
|
||||
x <<= 1
|
||||
x >>= 1
|
||||
x @= 1
|
||||
|
||||
Reference in New Issue
Block a user