You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Sync from decompyle3
This commit is contained in:
@@ -37,7 +37,7 @@ def while1stmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if tokens[loop_end] == "JUMP_BACK":
|
||||
loop_end += 1
|
||||
loop_end_offset = tokens[loop_end].off2int(prefer_last=False)
|
||||
for t in range(first+1, loop_end):
|
||||
for t in range(first + 1, loop_end):
|
||||
token = tokens[t]
|
||||
# token could be a pseudo-op like "LOAD_STR", which is not in
|
||||
# token.opc. We will replace that with LOAD_CONST as an
|
||||
@@ -46,6 +46,5 @@ def while1stmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if token.attr >= loop_end_offset:
|
||||
return True
|
||||
|
||||
|
||||
# SETUP_LOOP location must jump either to the last token or the token after the last one
|
||||
return tokens[first].attr not in (offset, offset + 2)
|
||||
|
Reference in New Issue
Block a user