diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-07T12·11+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2010-05-07T12·11+0000 |
commit | e2d5e40f4fdd98e5d2ad7b77c00fb97caa3aa259 (patch) | |
tree | b3b8ccf4d534ae55949b02107887574424041668 /src/libexpr/eval.hh | |
parent | 84ce7ac76feab6e9a5c074bd1b9550ae543d1db8 (diff) |
* Keep track of the source positions of attributes.
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 6912e22887fd..1a9862c29533 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -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; |