Correct 2.6 erroneous ifelse detection

This commit is contained in:
rocky
2022-08-23 16:50:50 -04:00
parent 9da3e4b3c0
commit 21b4d52a77
6 changed files with 168 additions and 10 deletions

View File

@@ -97,6 +97,10 @@ class Python24Parser(Python25Parser):
if self.version[:2] == (2, 4):
self.check_reduce['nop_stmt'] = 'tokens'
if self.version[:2] <= (2, 4):
# TODO: We may add something different or customize something
del self.reduce_check_table["ifelsestmt"]
def reduce_is_invalid(self, rule, ast, tokens, first, last):
invalid = super(Python24Parser,
self).reduce_is_invalid(rule, ast,