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:
parent
84ce7ac76f
commit
e2d5e40f4f
8 changed files with 117 additions and 86 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue