diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-04 18:51:01 +0200 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2014-04-04 18:59:29 +0200 |
commit | c28de6d96e7bfea834a44deac5217d4696fa8d86 (patch) | |
tree | 14e467d87b1677d09e2c7c06766414e24a713289 /src/libexpr/eval.hh | |
parent | 8b31ffd10de44871a3912184fedbeca57d8cf60f (diff) |
Pass position information to primop calls
For example:
error: `tail' called on an empty list, at
/home/eelco/Dev/nixpkgs/pkgs/applications/misc/hello/ex-2/default.nix:13:7
Diffstat (limited to 'src/libexpr/eval.hh')
-rw-r--r-- | src/libexpr/eval.hh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libexpr/eval.hh b/src/libexpr/eval.hh index 170b74079..e69b8455e 100644 --- a/src/libexpr/eval.hh +++ b/src/libexpr/eval.hh @@ -36,7 +36,7 @@ public: }; -typedef void (* PrimOpFun) (EvalState & state, Value * * args, Value & v); +typedef void (* PrimOpFun) (EvalState & state, const Pos & pos, Value * * args, Value & v); struct PrimOp @@ -227,7 +227,7 @@ public: bool eqValues(Value & v1, Value & v2); void callFunction(Value & fun, Value & arg, Value & v, const Pos & pos); - void callPrimOp(Value & fun, Value & arg, Value & v); + void callPrimOp(Value & fun, Value & arg, Value & v, const Pos & pos); /* Automatically call a function for which each argument has a default value or has a binding in the `args' map. */ @@ -278,7 +278,7 @@ private: friend struct ExprOpUpdate; friend struct ExprOpConcatLists; friend struct ExprSelect; - friend void prim_getAttr(EvalState & state, Value * * args, Value & v); + friend void prim_getAttr(EvalState & state, const Pos & pos, Value * * args, Value & v); }; |