Skip to content

Commit

Permalink
filterx/filterx-grammar: factor out expr_plus_generator
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Szakacs <[email protected]>
  • Loading branch information
alltilla committed Aug 13, 2024
1 parent e13a754 commit 58eafb9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/filterx/filterx-grammar.ym
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ construct_template_expr(LogTemplate *template)
%type <node> expr_value
%type <node> expr_generator
%type <node> expr_generator_unchecked
%type <node> expr_plus_generator
%type <node> generator_function_call
%type <node> function_call
%type <ptr> arguments
Expand Down Expand Up @@ -370,8 +371,12 @@ expr_generator_unchecked
: dict_generator
| list_generator
| generator_function_call
| expr_plus_generator
| '(' expr_generator ')' { $$ = $2; }
| expr '+' expr_generator { $$ = filterx_operator_plus_generator_new($1, $3); }
;

expr_plus_generator
: expr '+' expr_generator { $$ = filterx_operator_plus_generator_new($1, $3); }
| expr_generator '+' expr { $$ = filterx_operator_plus_generator_new($1, $3); }
| expr_generator '+' expr_generator { $$ = filterx_operator_plus_generator_new($1, $3); }
;
Expand Down

0 comments on commit 58eafb9

Please sign in to comment.