mirror of
https://github.com/NixOS/nix
synced 2025-06-25 23:11:16 +02:00
Show position info in attribute selection errors
This commit is contained in:
parent
4c5faad994
commit
8e5fbf4d73
3 changed files with 14 additions and 13 deletions
|
@ -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
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue