nixd
Loading...
Searching...
No Matches
libnixt/include/nixt/ParentMap.h
Go to the documentation of this file.
1/// \file
2/// \brief Construct child -> parent relations of `nix::Expr` nodes.
3
4#pragma once
5
6#include "Visitor.h"
7
8namespace nixt {
9
10/// \brief The parent map. The key is "child", the value is "parent".
11using ParentMap = std::map<const nix::Expr *, const nix::Expr *>;
12
13/// \brief Construct child -> parent relations of `nix::Expr` nodes.
14ParentMap parentMap(const nix::Expr *Root);
15
16} // namespace nixt
Describe how to traverse upon nix::Expr * nodes.
Access EvalCache in nix::EvalState.
Definition ArrayRef.h:7
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.