From 2b9e29b1c8b6b8e4884a46a3ba71ee795f1f97cd Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 6 Jul 2011 12:28:57 +0000 Subject: * Change the right-hand side of the ‘.’ operator from an attribute to an attribute path. This is a refactoring to support default values. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libexpr/parser.y | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/libexpr/parser.y') diff --git a/src/libexpr/parser.y b/src/libexpr/parser.y index 073fac1bee89..49bd7bfa5f12 100644 --- a/src/libexpr/parser.y +++ b/src/libexpr/parser.y @@ -325,8 +325,8 @@ expr_app ; expr_select - : expr_select '.' ID - { $$ = new ExprSelect($1, data->symbols.create($3)); } + : expr_simple '.' attrpath + { $$ = new ExprSelect($1, *$3); } | expr_simple { $$ = $1; } ; @@ -382,7 +382,7 @@ binds | binds INHERIT '(' expr ')' ids ';' { $$ = $1; /* !!! Should ensure sharing of the expression in $4. */ - foreach (AttrPath::iterator, i, *$6) { + foreach (vector::iterator, i, *$6) { if ($$->attrs.find(*i) != $$->attrs.end()) dupAttr(*i, makeCurPos(@6, data), $$->attrs[*i].pos); $$->attrs[*i] = ExprAttrs::AttrDef(new ExprSelect($4, *i), makeCurPos(@6, data)); -- cgit 1.4.1