You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-04 09:22:40 +08:00
Add "comp_if_not" for 2.6-
This commit is contained in:
@@ -33,7 +33,8 @@ def or_check(self, lhs, n, rule, ast, tokens, first, last):
|
||||
else:
|
||||
jump_true = expr_jt[1][0]
|
||||
|
||||
jmp_true_target = jump_true.attr
|
||||
jump_inst = self.insts[self.offset2inst_index[jump_true.offset]]
|
||||
jmp_true_target = jump_inst.argval
|
||||
|
||||
last_token = tokens[last]
|
||||
last_token_offset = last_token.off2int()
|
||||
@@ -43,6 +44,8 @@ def or_check(self, lhs, n, rule, ast, tokens, first, last):
|
||||
return False
|
||||
elif jmp_true_target < last_token_offset:
|
||||
return True
|
||||
elif expr_jt.kind == "expr_jt" and jmp_true_target > last_token_offset:
|
||||
return True
|
||||
|
||||
# If the jmp is backwards
|
||||
if last_token == "POP_JUMP_IF_FALSE" and not self.version in (2.7, 3.5, 3.6):
|
||||
|
Reference in New Issue
Block a user