diff options
author | Et7f3 <cadeaudeelie@gmail.com> | 2023-02-12 05:45:25 +0100 |
---|---|---|
committer | Et7f3 <cadeaudeelie@gmail.com> | 2023-02-12 05:49:45 +0100 |
commit | 3d16f2a2810a755b066738f3163abe7bd0d636ff (patch) | |
tree | 6ef5099b3b608a74ce4f9d7e8bffa447de8b8445 /src | |
parent | c18456604601dd233be4ad2462474488ef8f87e3 (diff) |
parser: use implicit rule
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/parser.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index ffb364a90..6f1041d2d 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -438,7 +438,7 @@ expr_select function named ‘or’, allow stuff like ‘map or [...]’. */ expr_simple OR_KW { $$ = new ExprCall(CUR_POS, $1, {new ExprVar(CUR_POS, data->symbols.create("or"))}); } - | expr_simple { $$ = $1; } + | expr_simple ; expr_simple @@ -455,7 +455,7 @@ expr_simple | IND_STRING_OPEN ind_string_parts IND_STRING_CLOSE { $$ = stripIndentation(CUR_POS, data->symbols, *$2); } - | path_start PATH_END { $$ = $1; } + | path_start PATH_END | path_start string_parts_interpolated PATH_END { $2->insert($2->begin(), {makeCurPos(@1, data), $1}); $$ = new ExprConcatStrings(CUR_POS, false, $2); @@ -596,7 +596,7 @@ attrpath ; attr - : ID { $$ = $1; } + : ID | OR_KW { $$ = {"or", 2}; } ; |