public interface AstWalkListener
Modifier and Type | Method and Description |
---|---|
void |
ascent(Aast ast)
Called whenever a transition from a child node to its parent takes
place during an AST walk.
|
void |
descent(Aast ast)
Called whenever a transition from a parent node to its first child
takes place during an AST walk.
|
void |
nextChild(Aast ast,
int index)
Called whenever a transition from a child node to its next right
sibling takes place during an AST walk.
|
void descent(Aast ast)
ast
- Source AST node which represents the parent in the parent to
child transition of the current AST walk.void ascent(Aast ast)
ast
- Source AST node which represents the parent in the child to
parent transition of the current AST walk.void nextChild(Aast ast, int index)
This method is not invoked after the last child is visited,
as this is the purpose of the ascent(com.goldencode.ast.Aast)
method.
ast
- Source AST node which represents the parent of the children
between which the lateral transition is taking place in the
current AST walk.index
- The 0-based index of the child which is about to be processed.