You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
Largish rework: scan while1stmt for jump out ..
to disambiguate. For this, we use the self.opc JUMP_OPS sets. For this, we neeed to store opc in the parse object. DRY uses of "last = min(last, len(tokens))
This commit is contained in:
@@ -116,7 +116,7 @@ def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
if jf_cf_pop == "jf_cf_pop" and jf_cf_pop[0] == "JUMP_FORWARD":
|
||||
jump_forward = jf_cf_pop[0]
|
||||
endif_target = int(jump_forward.pattr)
|
||||
last_offset = tokens[min(last, n-1)].off2int()
|
||||
last_offset = tokens[last].off2int()
|
||||
if endif_target != last_offset:
|
||||
return True
|
||||
|
||||
|
Reference in New Issue
Block a user