Commit 75a6099
Steffen Märcker
[DAG-copy] Implement DAG-aware visitor
After certain replacements, e.g., formula substitution, the AST becomes a directed acyclic graph.
Most often it is not required to visit a node of this DAG multiply times.
The new class DAGVisitor keeps track of the nodes already seen and visits each node only once.
The class DAGVisitor is inserted between ASTVisitor and ASTTraverse and ASTTraverseModify
without changing the behavior of their subclasses.1 parent 72416e1 commit 75a6099
3 files changed
Lines changed: 581 additions & 101 deletions
0 commit comments