mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-23 22:46:16 +02:00
Use 'errorCtx' name everywhere
This commit is contained in:
parent
57684d6247
commit
cbbbf36881
2 changed files with 6 additions and 6 deletions
|
@ -1050,21 +1050,21 @@ void EvalState::eval(Expr * e, Value & v)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline bool EvalState::evalBool(Env & env, Expr * e, const Pos & pos, const std::string & location)
|
inline bool EvalState::evalBool(Env & env, Expr * e, const Pos & pos, const std::string & errorCtx)
|
||||||
{
|
{
|
||||||
Value v;
|
Value v;
|
||||||
e->eval(*this, env, v);
|
e->eval(*this, env, v);
|
||||||
if (v.type() != nBool)
|
if (v.type() != nBool)
|
||||||
throwTypeError(pos, "%2%: value is %1% while a Boolean was expected", v, location);
|
throwTypeError(pos, "%2%: value is %1% while a Boolean was expected", v, errorCtx);
|
||||||
return v.boolean;
|
return v.boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void EvalState::evalAttrs(Env & env, Expr * e, Value & v, const Pos & pos, const std::string & location)
|
inline void EvalState::evalAttrs(Env & env, Expr * e, Value & v, const Pos & pos, const std::string & errorCtx)
|
||||||
{
|
{
|
||||||
e->eval(*this, env, v);
|
e->eval(*this, env, v);
|
||||||
if (v.type() != nAttrs)
|
if (v.type() != nAttrs)
|
||||||
throwTypeError(pos, "%2%: value is %1% while a set was expected", v, location);
|
throwTypeError(pos, "%2%: value is %1% while a set was expected", v, errorCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -217,8 +217,8 @@ public:
|
||||||
|
|
||||||
/* Evaluation the expression, then verify that it has the expected
|
/* Evaluation the expression, then verify that it has the expected
|
||||||
type. */
|
type. */
|
||||||
inline bool evalBool(Env & env, Expr * e, const Pos & pos, const std::string & location);
|
inline bool evalBool(Env & env, Expr * e, const Pos & pos, const std::string & errorCtx);
|
||||||
inline void evalAttrs(Env & env, Expr * e, Value & v, const Pos & pos, const std::string & location);
|
inline void evalAttrs(Env & env, Expr * e, Value & v, const Pos & pos, const std::string & errorCtx);
|
||||||
|
|
||||||
/* If `v' is a thunk, enter it and overwrite `v' with the result
|
/* If `v' is a thunk, enter it and overwrite `v' with the result
|
||||||
of the evaluation of the thunk. If `v' is a delayed function
|
of the evaluation of the thunk. If `v' is a delayed function
|
||||||
|
|
Loading…
Reference in a new issue