Revert augassign change but..

Make note of what's going on and add grammar test for bad
situations we have in Python 2.6 (and perhaps others)
This commit is contained in:
rocky
2016-11-11 09:08:02 -05:00
parent f4999f6300
commit 50c2e1bda9
4 changed files with 18 additions and 5 deletions

View File

@@ -265,10 +265,14 @@ class PythonParser(GenericASTBuilder):
def p_augmented_assign(self, args):
'''
stmt ::= augassign0
stmt ::= augassign1
stmt ::= augassign2
augassign0 ::= expr expr inplace_op designator
# This is odd in that other augassign1's have only 3 slots
# The designator isn't used as that's supposed to be also
# indicated in the first expr
augassign1 ::= expr expr inplace_op designator
augassign1 ::= expr expr inplace_op ROT_THREE STORE_SUBSCR
augassign2 ::= expr DUP_TOP LOAD_ATTR expr
inplace_op ROT_TWO STORE_ATTR