You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
Tentative fix for issue #437. I added a new set of rules in ifelsestmt.py to check against for offsets. Seems to have fixed current issue. The result output is switching nested if-else-if-else-etc to a chain of if-elif-elif now, but semantically seems correct.
This commit is contained in:
@@ -81,6 +81,16 @@ IFELSE_STMT_RULES = frozenset(
|
||||
"come_froms",
|
||||
),
|
||||
),
|
||||
(
|
||||
'ifelsestmtc',
|
||||
(
|
||||
'testexpr',
|
||||
'c_stmts_opt',
|
||||
'JUMP_FORWARD',
|
||||
'else_suite',
|
||||
'come_froms'
|
||||
),
|
||||
),
|
||||
(
|
||||
"ifelsestmt",
|
||||
(
|
||||
|
Reference in New Issue
Block a user