You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 08:49:51 +08:00
3.x ifelsestmtc reduction rule fix
This commit is contained in:
@@ -33,13 +33,23 @@ IFELSE_STMT_RULES = frozenset(
|
||||
"else_suitec",
|
||||
),
|
||||
),
|
||||
(
|
||||
"ifelsestmtc",
|
||||
(
|
||||
"testexpr",
|
||||
"c_stmts_opt",
|
||||
"jump_forward_else",
|
||||
"else_suitec",
|
||||
"\\e__come_froms",
|
||||
),
|
||||
),
|
||||
(
|
||||
"ifelsestmtc",
|
||||
(
|
||||
"testexpr",
|
||||
"c_stmts_opt",
|
||||
"jump_absolute_else",
|
||||
"else_suitec"
|
||||
"else_suitec",
|
||||
),
|
||||
),
|
||||
(
|
||||
@@ -94,6 +104,7 @@ def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
|
||||
return True
|
||||
|
||||
if rule not in IFELSE_STMT_RULES:
|
||||
# print("XXX", rule)
|
||||
return False
|
||||
|
||||
# Avoid if/else where the "then" is a "raise_stmt1" for an
|
||||
|
Reference in New Issue
Block a user