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:
Dhruv Manilawala
2024-03-07 18:37:09 +05:30
committed by GitHub
parent b5cc384bb1
commit 035ac75fae
8 changed files with 2032 additions and 151 deletions

View File

@@ -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