You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 16:59:52 +08:00
ifstmt reduction vs extended_args
This commit is contained in:
@@ -46,13 +46,12 @@ def ifstmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if testexpr[0] in ("testtrue", "testfalse"):
|
||||
test = testexpr[0]
|
||||
if len(test) > 1 and test[1].kind.startswith("jmp_"):
|
||||
if last == n:
|
||||
last -= 1
|
||||
last = min(last, n-1)
|
||||
jmp_target = test[1][0].attr
|
||||
if (
|
||||
tokens[first].off2int()
|
||||
tokens[first].off2int(True)
|
||||
<= jmp_target
|
||||
< tokens[last].off2int()
|
||||
< tokens[last].off2int(False)
|
||||
):
|
||||
return True
|
||||
# jmp_target less than tokens[first] is okay - is to a loop
|
||||
|
Reference in New Issue
Block a user