From bfde66c5e1b8ded84da4fa0aef40b414cb9a853d Mon Sep 17 00:00:00 2001 From: rocky Date: Sat, 14 Dec 2019 19:49:26 -0500 Subject: [PATCH] Extend "and" reduction-rule test to 2.4 --- uncompyle6/parsers/parse26.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/uncompyle6/parsers/parse26.py b/uncompyle6/parsers/parse26.py index 2d91e9ad..f85d8f45 100644 --- a/uncompyle6/parsers/parse26.py +++ b/uncompyle6/parsers/parse26.py @@ -341,8 +341,7 @@ class Python26Parser(Python2Parser): WITH_CLEANUP END_FINALLY """) super(Python26Parser, self).customize_grammar_rules(tokens, customize) - if self.version >= 2.6: - self.check_reduce['and'] = 'AST' + self.check_reduce['and'] = 'AST' self.check_reduce['assert_expr_and'] = 'AST' self.check_reduce['list_for'] = 'AST' self.check_reduce['try_except'] = 'tokens' @@ -380,6 +379,7 @@ class Python26Parser(Python2Parser): # or that it jumps to the same place as the end of "and" jmp_false = ast[1][0] jmp_target = jmp_false.offset + jmp_false.attr + 3 + return not (jmp_target == tokens[test_index].offset or tokens[last].pattr == jmp_false.pattr) elif rule == (