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

* Keep track of the source positions of attributes.

This commit is contained in:
Eelco Dolstra 2010-05-07 12:11:05 +00:00
parent 84ce7ac76f
commit e2d5e40f4f
8 changed files with 117 additions and 86 deletions

View file

@ -14,8 +14,9 @@ class Hash;
class EvalState;
struct Env;
struct Value;
struct Attr;
typedef std::map<Symbol, Value> Bindings;
typedef std::map<Symbol, Attr> Bindings;
typedef enum {
@ -111,6 +112,14 @@ struct Env
};
struct Attr
{
Value value;
Pos * pos;
Attr() : pos(&noPos) { };
};
static inline void mkInt(Value & v, int n)
{
v.type = tInt;