about summary refs log tree commit diff
path: root/src/libexpr/nixexpr.hh
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T20·52+0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-04-04T20·52+0200
commit8e5fbf4d730b9fcf39eddf5539a206cf19d2cdce (patch)
tree281d7553329e1f7431cc667be20ca60f4558acb3 /src/libexpr/nixexpr.hh
parent4c5faad99408cdfc35a8b0923d1efdf288fd9990 (diff)
Show position info in attribute selection errors
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 f07b85c8343c..813efbe21acd 100644
--- a/src/libexpr/nixexpr.hh
+++ b/src/libexpr/nixexpr.hh
@@ -149,10 +149,11 @@ struct ExprVar : Expr
 
 struct ExprSelect : Expr
 {
+    Pos pos;
     Expr * e, * def;
     AttrPath attrPath;
-    ExprSelect(Expr * e, const AttrPath & attrPath, Expr * def) : e(e), def(def), attrPath(attrPath) { };
-    ExprSelect(Expr * e, const Symbol & name) : e(e), def(0) { attrPath.push_back(AttrName(name)); };
+    ExprSelect(const Pos & pos, Expr * e, const AttrPath & attrPath, Expr * def) : pos(pos), e(e), def(def), attrPath(attrPath) { };
+    ExprSelect(const Pos & pos, Expr * e, const Symbol & name) : pos(pos), e(e), def(0) { attrPath.push_back(AttrName(name)); };
     COMMON_METHODS
 };