mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
Make most calls to determinePos() lazy
This commit is contained in:
parent
4c755c3b3f
commit
bd383d1b6f
10 changed files with 46 additions and 24 deletions
|
|
@ -224,6 +224,9 @@ public:
|
|||
result. Otherwise, this is a no-op. */
|
||||
inline void forceValue(Value & v, const Pos & pos);
|
||||
|
||||
template <typename Callable>
|
||||
inline void forceValue(Value & v, Callable getPos);
|
||||
|
||||
/* Force a value, then recursively force list elements and
|
||||
attributes. */
|
||||
void forceValueDeep(Value & v);
|
||||
|
|
@ -232,7 +235,12 @@ public:
|
|||
NixInt forceInt(Value & v, const Pos & pos);
|
||||
NixFloat forceFloat(Value & v, const Pos & pos);
|
||||
bool forceBool(Value & v, const Pos & pos);
|
||||
inline void forceAttrs(Value & v, const Pos & pos);
|
||||
|
||||
void forceAttrs(Value & v, const Pos & pos);
|
||||
|
||||
template <typename Callable>
|
||||
inline void forceAttrs(Value & v, Callable getPos);
|
||||
|
||||
inline void forceList(Value & v, const Pos & pos);
|
||||
void forceFunction(Value & v, const Pos & pos); // either lambda or primop
|
||||
std::string_view forceString(Value & v, const Pos & pos = noPos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue