You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Remove more 3.0 parse errors...
However this doesn't mean that some wrong rules still don't kid in. We still have control-flow "if/and/else" vs "if/if/else" problems.
This commit is contained in:
@@ -258,7 +258,11 @@ class Python30Parser(Python31Parser):
|
||||
if rule[0] == "iflaststmtl":
|
||||
return not (jmp_false[0].attr <= tokens[last].offset)
|
||||
else:
|
||||
return not (tokens[first].offset <= jmp_false[0].attr <= tokens[last].offset)
|
||||
jmp_false_target = jmp_false[0].attr
|
||||
if tokens[first].offset > jmp_false_target:
|
||||
return True
|
||||
return (
|
||||
(jmp_false_target > tokens[last].offset) and tokens[last] != "JUMP_FORWARD")
|
||||
pass
|
||||
pass
|
||||
pass
|
||||
|
Reference in New Issue
Block a user