public class ASTNode extends org.antlr.runtime.tree.CommonTree implements Node, Serializable
| Constructor and Description |
|---|
ASTNode() |
ASTNode(ASTNode node) |
ASTNode(org.antlr.runtime.Token t)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(org.antlr.runtime.tree.Tree t) |
void |
addChildren(List kids) |
Object |
deleteChild(int i) |
String |
dump() |
org.antlr.runtime.tree.Tree |
dupNode() |
ArrayList<Node> |
getChildren()
Gets the vector of children nodes.
|
String |
getName()
Gets the name of the node.
|
ASTNodeOrigin |
getOrigin() |
void |
insertChild(int i,
Object t) |
void |
replaceChildren(int startChildIndex,
int stopChildIndex,
Object t) |
void |
setChild(int i,
org.antlr.runtime.tree.Tree t) |
void |
setOrigin(ASTNodeOrigin origin)
Tag this ASTNode with information about the object from which this node
originated.
|
void |
setParent(org.antlr.runtime.tree.Tree t) |
void |
setUnknownTokenBoundaries()
For every node in this subtree, make sure it's start/stop token's
are set.
|
String |
toStringTree() |
getCharPositionInLine, getChildIndex, getLine, getParent, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setTokenStartIndex, setTokenStopIndex, toStringcreateChildrenList, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChild, getChildCount, getFirstChildWithType, hasAncestor, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexespublic ASTNode()
public ASTNode(org.antlr.runtime.Token t)
t - Token for the CommonTree Nodepublic ASTNode(ASTNode node)
public org.antlr.runtime.tree.Tree dupNode()
dupNode in interface org.antlr.runtime.tree.TreedupNode in class org.antlr.runtime.tree.CommonTreepublic ArrayList<Node> getChildren()
NodegetChildren in interface NodegetChildren in class org.antlr.runtime.tree.BaseTreepublic String getName()
Nodepublic void setUnknownTokenBoundaries()
setUnknownTokenBoundaries in class org.antlr.runtime.tree.CommonTreepublic ASTNodeOrigin getOrigin()
public void setOrigin(ASTNodeOrigin origin)
public String dump()
public void setParent(org.antlr.runtime.tree.Tree t)
setParent in interface org.antlr.runtime.tree.TreesetParent in class org.antlr.runtime.tree.CommonTreepublic void addChild(org.antlr.runtime.tree.Tree t)
addChild in interface org.antlr.runtime.tree.TreeaddChild in class org.antlr.runtime.tree.BaseTreepublic void addChildren(List kids)
addChildren in class org.antlr.runtime.tree.BaseTreepublic void setChild(int i,
org.antlr.runtime.tree.Tree t)
setChild in interface org.antlr.runtime.tree.TreesetChild in class org.antlr.runtime.tree.BaseTreepublic void insertChild(int i,
Object t)
insertChild in class org.antlr.runtime.tree.BaseTreepublic Object deleteChild(int i)
deleteChild in interface org.antlr.runtime.tree.TreedeleteChild in class org.antlr.runtime.tree.BaseTreepublic void replaceChildren(int startChildIndex,
int stopChildIndex,
Object t)
replaceChildren in interface org.antlr.runtime.tree.TreereplaceChildren in class org.antlr.runtime.tree.BaseTreepublic String toStringTree()
toStringTree in interface org.antlr.runtime.tree.TreetoStringTree in class org.antlr.runtime.tree.BaseTreeCopyright © 2019 The Apache Software Foundation. All Rights Reserved.