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, toString
createChildrenList, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChild, getChildCount, getFirstChildWithType, hasAncestor, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes
public 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.Tree
dupNode
in class org.antlr.runtime.tree.CommonTree
public ArrayList<Node> getChildren()
Node
getChildren
in interface Node
getChildren
in class org.antlr.runtime.tree.BaseTree
public String getName()
Node
public void setUnknownTokenBoundaries()
setUnknownTokenBoundaries
in class org.antlr.runtime.tree.CommonTree
public 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.Tree
setParent
in class org.antlr.runtime.tree.CommonTree
public void addChild(org.antlr.runtime.tree.Tree t)
addChild
in interface org.antlr.runtime.tree.Tree
addChild
in class org.antlr.runtime.tree.BaseTree
public void addChildren(List kids)
addChildren
in class org.antlr.runtime.tree.BaseTree
public void setChild(int i, org.antlr.runtime.tree.Tree t)
setChild
in interface org.antlr.runtime.tree.Tree
setChild
in class org.antlr.runtime.tree.BaseTree
public void insertChild(int i, Object t)
insertChild
in class org.antlr.runtime.tree.BaseTree
public Object deleteChild(int i)
deleteChild
in interface org.antlr.runtime.tree.Tree
deleteChild
in class org.antlr.runtime.tree.BaseTree
public void replaceChildren(int startChildIndex, int stopChildIndex, Object t)
replaceChildren
in interface org.antlr.runtime.tree.Tree
replaceChildren
in class org.antlr.runtime.tree.BaseTree
public String toStringTree()
toStringTree
in interface org.antlr.runtime.tree.Tree
toStringTree
in class org.antlr.runtime.tree.BaseTree
Copyright © 2021 The Apache Software Foundation. All rights reserved.