Merge branch 'master' into python-2.4

This commit is contained in:
rocky
2018-01-29 15:41:14 -05:00
16 changed files with 107 additions and 34 deletions

View File

@@ -503,7 +503,7 @@ class Python2Parser(PythonParser):
self.check_reduce['aug_assign1'] = 'AST'
self.check_reduce['aug_assign2'] = 'AST'
self.check_reduce['_stmts'] = 'AST'
# self.check_reduce['_stmts'] = 'AST'
# Dead code testing...
# self.check_reduce['while1elsestmt'] = 'tokens'
@@ -520,15 +520,6 @@ class Python2Parser(PythonParser):
if lhs in ('aug_assign1', 'aug_assign2') and ast[0] and ast[0][0] == 'and':
return True
elif lhs == '_stmts':
for i, stmt in enumerate(ast):
if stmt == '_stmts':
stmt = stmt[0]
assert stmt == 'stmt'
if stmt[0] == 'return':
return i+1 != len(ast)
pass
return False
return False
class Python2ParserSingle(Python2Parser, PythonParserSingle):