handle newer parser reduction behavior

This commit is contained in:
rocky
2017-10-03 11:53:05 -04:00
parent c17ac696d6
commit 9be9abc682
3 changed files with 4 additions and 4 deletions

View File

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