Bug in using python2 ast checking in python 2.5

This commit is contained in:
rocky
2016-12-26 01:55:16 -05:00
parent c8a4dcf72b
commit 7f2bee46b7

View File

@@ -41,8 +41,11 @@ class Python25Parser(Python26Parser):
self.check_reduce['tryelsestmt'] = 'tokens'
def reduce_is_invalid(self, rule, ast, tokens, first, last):
super(Python25Parser, self).reduce_is_invalid(rule, ast, tokens, first, last)
invalid = super(Python25Parser,
self).reduce_is_invalid(rule, ast,
tokens, first, last)
if invalid:
return invalid
lhs = rule[0]
if lhs in ('tryelsestmt', ):
# The end of the else part of try/else come_from has to come