From 8e5fbf4d730b9fcf39eddf5539a206cf19d2cdce Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 4 Apr 2014 22:52:14 +0200 Subject: Show position info in attribute selection errors --- 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 f07b85c83..813efbe21 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 }; -- cgit v1.2.3