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/nixexpr.hh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/libexpr/nixexpr.hh') diff --git a/src/libexpr/nixexpr.hh b/src/libexpr/nixexpr.hh index 205f579daf3d..725e30c6fa6d 100644 --- a/src/libexpr/nixexpr.hh +++ b/src/libexpr/nixexpr.hh @@ -122,8 +122,9 @@ struct ExprVar : Expr struct ExprSelect : Expr { Expr * e; - Symbol name; - ExprSelect(Expr * e, const Symbol & name) : e(e), name(name) { }; + AttrPath attrPath; + ExprSelect(Expr * e, const AttrPath & attrPath) : e(e), attrPath(attrPath) { }; + ExprSelect(Expr * e, const Symbol & name) : e(e) { attrPath.push_back(name); }; COMMON_METHODS }; -- cgit 1.4.1