Skip to content

Commit d5ce564

Browse files
committed
Put FLOC at all functions
1 parent 76fce89 commit d5ce564

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/lpython/parser/parser.yy

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -698,26 +698,26 @@ comma_opt
698698

699699
function_def
700700
: decorators_opt KW_DEF id "(" parameter_list_opt ")" ":"
701-
body_stmts { $$ = FUNCTION_01($1, $3, $5, $8, @$); }
701+
body_stmts { FLOC(@$, @2); $$ = FUNCTION_01($1, $3, $5, $8, @$); }
702702
| decorators_opt KW_DEF id "(" parameter_list_opt ")" "->" expr ":"
703703
body_stmts { FLOC(@$, @2); $$ = FUNCTION_02($1, $3, $5, $8, $10, @$); }
704704
| decorators_opt KW_DEF id "(" parameter_list_opt ")" ":"
705705
TK_TYPE_COMMENT sep statements {
706-
$$ = FUNCTION_03($1, $3, $5, $10, $8, @$); }
706+
FLOC(@$, @2); $$ = FUNCTION_03($1, $3, $5, $10, $8, @$); }
707707
| decorators_opt KW_DEF id "(" parameter_list_opt ")" "->" expr ":"
708708
TK_TYPE_COMMENT sep statements {
709-
$$ = FUNCTION_04($1, $3, $5, $8, $12, $10, @$); }
709+
FLOC(@$, @2); $$ = FUNCTION_04($1, $3, $5, $8, $12, $10, @$); }
710710
| decorators_opt KW_DEF id "(" parameter_list_opt ")" ":"
711711
sep TK_TYPE_COMMENT sep statements {
712-
$$ = FUNCTION_03($1, $3, $5, $11, $9, @$); }
712+
FLOC(@$, @2); $$ = FUNCTION_03($1, $3, $5, $11, $9, @$); }
713713
| decorators_opt KW_DEF id "(" parameter_list_opt ")" "->" expr ":"
714714
sep TK_TYPE_COMMENT sep statements {
715-
$$ = FUNCTION_04($1, $3, $5, $8, $13, $11, @$); }
715+
FLOC(@$, @2); $$ = FUNCTION_04($1, $3, $5, $8, $13, $11, @$); }
716716
;
717717

718718
class_def
719719
: decorators_opt KW_CLASS id ":" body_stmts {
720-
$$ = CLASS_01($1, $3, $5, @$); }
720+
FLOC(@$, @2); $$ = CLASS_01($1, $3, $5, @$); }
721721
| decorators_opt KW_CLASS id "(" call_arguement_list ")" ":" body_stmts {
722722
FLOC(@$, @2); $$ = CLASS_02($1, $3, $5, $8, @$); }
723723
;

0 commit comments

Comments
 (0)