1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 23:11:16 +02:00

Add a symbol __curPos that expands to the current source location

I.e. an attribute set { file = <string>; line = <int>; column = <int>; }.
This commit is contained in:
Eelco Dolstra 2013-11-18 20:14:54 +01:00
parent 90b5e69284
commit fc33fd86b7
7 changed files with 43 additions and 2 deletions

View file

@ -282,6 +282,13 @@ struct ExprConcatStrings : Expr
COMMON_METHODS
};
struct ExprPos : Expr
{
Pos pos;
ExprPos(const Pos & pos) : pos(pos) { };
COMMON_METHODS
};
/* Static environments are used to map variable names onto (level,
displacement) pairs used to obtain the value of the variable at