visitor library

Classes

BreadthFirstVisitor<R>
An AST visitor that will recursively visit all of the nodes in an AST structure, similar to GeneralizingAstVisitor. This visitor uses a breadth-first ordering rather than the depth-first ordering of GeneralizingAstVisitor. [...]
DelegatingAstVisitor<T>
An AST visitor that will recursively visit all of the nodes in an AST structure. For each node that is visited, the corresponding visit method on one or more other visitors (the 'delegates') will be invoked. [...]
GeneralizingAstVisitor<R>
An AST visitor that will recursively visit all of the nodes in an AST structure (like instances of the class RecursiveAstVisitor). In addition, when a node of a specific type is visited not only will the visit method for that specific type of node be invoked, but additional methods for the superclasses of that node will also be invoked. For example, using an instance of this class to visit a Block will cause the method visitBlock to be invoked but will also cause the methods visitStatement and visitNode to be subsequently invoked. This allows visitors to be written that visit all statements without needing to override the visit method for each of the specific subclasses of Statement. [...]
RecursiveAstVisitor<R>
An AST visitor that will recursively visit all of the nodes in an AST structure. For example, using an instance of this class to visit a Block will also cause all of the statements in the block to be visited. [...]
SimpleAstVisitor<R>
An AST visitor that will do nothing when visiting an AST node. It is intended to be a superclass for classes that use the visitor pattern primarily as a dispatch mechanism (and hence don't need to recursively visit a whole structure) and that only need to visit a small number of node types. [...]
ThrowingAstVisitor<R>
An AST visitor that will throw an exception if any of the visit methods that are invoked have not been overridden. It is intended to be a superclass for classes that implement the visitor pattern and need to (a) override all of the visit methods or (b) need to override a subset of the visit method and want to catch when any other visit methods have been invoked. [...]
TimedAstVisitor<T>
An AST visitor that captures visit call timings. [...]
UnifyingAstVisitor<R>
An AST visitor that will recursively visit all of the nodes in an AST structure (like instances of the class RecursiveAstVisitor). In addition, every node will also be visited by using a single unified visitNode method. [...]