about summary refs log tree commit diff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2011-07-06T12·28+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2011-07-06T12·28+0000
commit2b9e29b1c8b6b8e4884a46a3ba71ee795f1f97cd (patch)
tree9b4dd1efce2222e6fdf29ceaaca1f477b77e532b /src/libexpr/nixexpr.hh
parent5580f3817c37135dcc633d84d1360a17a8878a58 (diff)
* Change the right-hand side of the ‘.’ operator from an attribute to
  an attribute path.  This is a refactoring to support default values.

Diffstat (limited to 'src/libexpr/nixexpr.hh')
-rw-r--r--src/libexpr/nixexpr.hh5
1 files changed, 3 insertions, 2 deletions
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
 };