* Keep track of the source positions of attributes.
This commit is contained in:
+10
-1
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user