Skip to content

Commit 049d7c2

Browse files
committed
Add grammar rule involving RETURN_END_IF
1 parent e357946 commit 049d7c2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

uncompyle6/parsers/parse35.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ def p_35on(self, args):
111111
return_if_stmt ::= return_expr RETURN_END_IF POP_BLOCK
112112
return_if_lambda ::= RETURN_END_IF_LAMBDA COME_FROM
113113
114+
return ::= return_expr RETURN_END_IF
115+
114116
jb_else ::= JUMP_BACK ELSE
115117
ifelsestmtc ::= testexpr c_stmts_opt JUMP_FORWARD else_suitec
116118
ifelsestmtl ::= testexpr c_stmts_opt jb_else else_suitel

uncompyle6/semantics/consts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@
431431
"mkfuncdeco": ("%|@%c\n%c", (0, "expr"), 1),
432432
# A custom rule in n_function def distinguishes whether to call this or
433433
# function_def_async
434-
"mkfuncdeco0": ("%|def %c\n", (0, "mkfunc")),
434+
"mkfuncdeco0": ("%|def %c\n", (0, ("mkfunc", "mkfunc_annotate"))),
435435

436436
# In cases where we desire an explict new line.
437437
# After docstrings which are followed by a "def" is

0 commit comments

Comments
 (0)