template<class Derived>
struct nixt::RecursiveASTVisitor< Derived >
A CRTP base class for traversing nix::Expr *
nodes.
Usage:
bool traverseExpr(const nix::Expr *E) {
}
bool visitExprInt(const nix::ExprInt *E) { return true; }
bool visitExprFloat(const nix::ExprFloat *E) { return true; }
} V;
V.traverseExpr(Root);
A CRTP base class for traversing nix::Expr * nodes.
bool shouldTraversePostOrder()
- Note
- This is based on dynamic_cast, so it is not very efficient.
visit*()
methods are called once for each node.traverse*()
methods are automatically generated describing relations between nodes. Usually you should always write custom visit*()
methods, and only write traverse*()
methods when you need to do something special.
Definition at line 48 of file Visitor.h.