Skip to content

Commit 642da94

Browse files
committed
Exclude decorators for functions too
1 parent dbeef4e commit 642da94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lpython/parser/parser.yy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ function_def
700700
: decorators_opt KW_DEF id "(" parameter_list_opt ")" ":"
701701
body_stmts { $$ = FUNCTION_01($1, $3, $5, $8, @$); }
702702
| decorators_opt KW_DEF id "(" parameter_list_opt ")" "->" expr ":"
703-
body_stmts { $$ = FUNCTION_02($1, $3, $5, $8, $10, @$); }
703+
body_stmts { @$.first = @2.first; $$ = FUNCTION_02($1, $3, $5, $8, $10, @$); }
704704
| decorators_opt KW_DEF id "(" parameter_list_opt ")" ":"
705705
TK_TYPE_COMMENT sep statements {
706706
$$ = FUNCTION_03($1, $3, $5, $10, $8, @$); }

0 commit comments

Comments
 (0)