diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 8a0a79c964f..3b238a0c98e 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -343,6 +343,15 @@ expr_function }); $$ = new ExprLet($2, $4); } + | INHERIT '(' expr ')' '[' attrs ']' + { auto ret = new ExprList; + ret->elems.reserve($6->size()); + /* !!! Should ensure sharing of the expression in $3. */ + for (auto & i : *$6) { + ret->elems.push_back(new ExprSelect(makeCurPos(@6, data), $3, i.symbol)); + } + $$ = ret; + } | expr_if ;