spark-parser induced changes...

reduce rules can be called without token streams.
This commit is contained in:
rocky
2017-10-02 03:09:28 -04:00
parent 1d7a3c6444
commit c8d15e7654
2 changed files with 4 additions and 0 deletions

View File

@@ -884,6 +884,8 @@ class Python3Parser(PythonParser):
return
def reduce_is_invalid(self, rule, ast, tokens, first, last):
if not tokens:
return
lhs = rule[0]
if lhs in ('augassign1', 'augassign2') and ast[0][0] == 'and':
return True