9 const nix::Expr *ParentExpr;
12 bool traverseExpr(
const nix::Expr *E) {
13 CapturedRet->insert({E, ParentExpr});
14 const auto *OldParent = ParentExpr;
22 ParentExpr = OldParent;
28 Visitor.ParentExpr = Root;
29 Visitor.CapturedRet = &Ret;
31 Visitor.traverseExpr(Root);
Construct child -> parent relations of nix::Expr nodes.
Access EvalCache in nix::EvalState.
std::map< const nix::Expr *, const nix::Expr * > ParentMap
The parent map. The key is "child", the value is "parent".
ParentMap parentMap(const nix::Expr *Root)
Construct child -> parent relations of nix::Expr nodes.
A CRTP base class for traversing nix::Expr * nodes.