类 TreeVisitor
- java.lang.Object
-
- org.antlr.runtime.tree.TreeVisitor
-
public class TreeVisitor extends java.lang.Object
Do a depth first walk of a tree, applying pre() and post() actions as we discover and finish nodes.
-
-
字段概要
字段 修饰符和类型 字段 说明 protected TreeAdaptor
adaptor
-
构造器概要
构造器 构造器 说明 TreeVisitor()
TreeVisitor(TreeAdaptor adaptor)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.Object
visit(java.lang.Object t, TreeVisitorAction action)
Visit every node in tree t and trigger an action for each node before/after having visited all of its children.
-
-
-
字段详细资料
-
adaptor
protected TreeAdaptor adaptor
-
-
构造器详细资料
-
TreeVisitor
public TreeVisitor(TreeAdaptor adaptor)
-
TreeVisitor
public TreeVisitor()
-
-
方法详细资料
-
visit
public java.lang.Object visit(java.lang.Object t, TreeVisitorAction action)
Visit every node in tree t and trigger an action for each node before/after having visited all of its children. Execute both actions even if t has no children. If a child visit yields a new child, it can update its parent's child list or just return the new child. The child update code works even if the child visit alters its parent and returns the new tree. Return result of applying post action to this node.
-
-