Skip to content

Commit 02f502c

Browse files
committed
New grammar rule often imples expanded reduce rule
1 parent de4fbb0 commit 02f502c

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

uncompyle6/parsers/reducecheck/ifelsestmt.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@
9595
"else_suite",
9696
),
9797
),
98+
(
99+
"ifelsestmt",
100+
(
101+
"testexpr",
102+
"stmts",
103+
"jf_cfs",
104+
"else_suite_opt",
105+
"opt_come_from_except",
106+
),
107+
),
98108
])
99109

100110
def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
@@ -108,7 +118,7 @@ def ifelsestmt(self, lhs, n, rule, ast, tokens, first, last):
108118
return False
109119

110120
# Avoid if/else where the "then" is a "raise_stmt1" for an
111-
# assert statemetn. Parse this as an "assert" instead.
121+
# assert statement. Parse this as an "assert" instead.
112122
stmts = ast[1]
113123
if stmts in ("c_stmts",) and len(stmts) == 1:
114124
raise_stmt1 = stmts[0]

0 commit comments

Comments
 (0)