Skip to content

Commit 6c44235

Browse files
committed
filterx/filterx-grammar: set location for generator expressions
Signed-off-by: Balazs Scheidler <balazs.scheidler@axoflow.com>
1 parent f04415c commit 6c44235

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/filterx/filterx-grammar.ym

+4-4
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ _assign_location(FilterXExpr *expr, CfgLexer *lexer, CFG_LTYPE *lloc)
138138
%type <node> comparison_operator
139139
%type <node> arithmetic_operator
140140
%type <node> expr_generator
141-
%type <node> expr_generator_unchecked
141+
%type <node> __expr_generator
142142
%type <node> expr_plus_generator
143143
%type <node> generator_function_call
144144
%type <node> function_call
@@ -458,13 +458,13 @@ expr_value
458458
;
459459

460460
expr_generator
461-
: expr_generator_unchecked {
462-
$$ = $1;
461+
: __expr_generator {
463462
CHECK_ERROR($1, @1, "error initializing generator expression");
463+
$$ = _assign_location($1, lexer, &@1);
464464
}
465465
;
466466

467-
expr_generator_unchecked
467+
__expr_generator
468468
: dict_generator
469469
| list_generator
470470
| generator_function_call

0 commit comments

Comments
 (0)