mirror of
https://github.com/NixOS/nix
synced 2025-06-26 11:41:15 +02:00
storing staticenv bindings
This commit is contained in:
parent
b9d08b98da
commit
aad27143c6
3 changed files with 71 additions and 1 deletions
|
@ -689,6 +689,29 @@ void printEnvBindings(const Env &env, int lv )
|
|||
}
|
||||
}
|
||||
|
||||
void printStaticEnvBindings(const StaticEnv &se, int lvl)
|
||||
{
|
||||
for (auto i = se.vars.begin(); i != se.vars.end(); ++i)
|
||||
{
|
||||
std::cout << lvl << i->first << std::endl;
|
||||
}
|
||||
|
||||
if (se.up) {
|
||||
printStaticEnvBindings(*se.up, ++lvl);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void printStaticEnvBindings(const Expr &expr)
|
||||
{
|
||||
// just print the names for now
|
||||
if (expr.staticenv)
|
||||
{
|
||||
printStaticEnvBindings(*expr.staticenv.get(), 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void printEnvPosChain(const Env &env, int lv )
|
||||
{
|
||||
std::cout << "printEnvPosChain " << lv << std::endl;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue