Package org.eclipse.epsilon.common.parse
Class AST
java.lang.Object
org.antlr.runtime.tree.BaseTree
org.antlr.runtime.tree.CommonTree
org.eclipse.epsilon.common.parse.AST
- All Implemented Interfaces:
org.antlr.runtime.tree.Tree
public class AST
extends org.antlr.runtime.tree.CommonTree
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ASTprotected Integerprotected List<org.antlr.runtime.Token>protected List<org.antlr.runtime.Token>protected booleanprotected Integerprotected IModuleprotected Regionprotected URIFields inherited from class org.antlr.runtime.tree.CommonTree
childIndex, parent, startIndex, stopIndex, tokenFields inherited from class org.antlr.runtime.tree.BaseTree
childrenFields inherited from interface org.antlr.runtime.tree.Tree
INVALID_NODE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild()protected voidcollectDescendants(AST ast, List<AST> descendants, boolean addAst) Returns the basename of the URI of this AST, which is the last segment of its URI.getChild(int i) intList<org.antlr.runtime.Token>List<org.antlr.runtime.Token>getFile()intgetLine()intgetUri()booleanbooleansetAnnotationsAst(AST annotations) setColumn(int column) voidsetCommentTokens(List<org.antlr.runtime.Token> comments) voidsetExtraTokens(List<org.antlr.runtime.Token> extraTokens) setFirstChild(AST child) voidsetImaginary(boolean imaginary) setLine(int line) voidsetNextSibling(AST sibling) voidvoidsetToken(org.antlr.runtime.Token token) voidprotected StringtoExtendedStringTree(int indent) Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getChildIndex, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toStringMethods inherited from class org.antlr.runtime.tree.BaseTree
addChild, addChildren, createChildrenList, deleteChild, freshenParentAndChildIndexes, freshenParentAndChildIndexes, freshenParentAndChildIndexesDeeply, freshenParentAndChildIndexesDeeply, getAncestor, getAncestors, getChildCount, getFirstChildWithType, hasAncestor, insertChild, replaceChildren, sanityCheckParentAndChildIndexes, sanityCheckParentAndChildIndexes, setChild, toStringTree
-
Field Details
-
uri
-
line
-
column
-
region
-
annotations
-
imaginary
protected boolean imaginary -
extraTokens
-
commentTokens
-
descendants
-
module
-
properties
-
-
Constructor Details
-
AST
public AST() -
AST
public AST(org.antlr.runtime.tree.CommonTree commontree) -
AST
-
AST
public AST(org.antlr.runtime.Token token) -
AST
-
AST
-
-
Method Details
-
build
public void build() -
getModule
-
setModule
-
setUri
-
setAnnotationsAst
-
getAnnotationsAst
-
getProperties
-
getBasename
Returns the basename of the URI of this AST, which is the last segment of its URI.getFile()returnsnullfor non-file:///URIs, which is correct in its own regard, but may produce NPEs in our case. -
getFile
-
getUri
-
getChildren
- Overrides:
getChildrenin classorg.antlr.runtime.tree.BaseTree
-
getParent
- Specified by:
getParentin interfaceorg.antlr.runtime.tree.Tree- Overrides:
getParentin classorg.antlr.runtime.tree.CommonTree
-
setLine
-
getLine
public int getLine()- Specified by:
getLinein interfaceorg.antlr.runtime.tree.Tree- Overrides:
getLinein classorg.antlr.runtime.tree.CommonTree
-
setColumn
-
getColumn
public int getColumn() -
getNextSibling
-
setNextSibling
-
hasChildren
public boolean hasChildren() -
getChild
- Specified by:
getChildin interfaceorg.antlr.runtime.tree.Tree- Overrides:
getChildin classorg.antlr.runtime.tree.BaseTree
-
getNumberOfChildren
public int getNumberOfChildren() -
getFirstChild
-
setFirstChild
-
getSecondChild
-
getThirdChild
-
getFourthChild
-
getLastChild
-
getRegion
-
setToken
public void setToken(org.antlr.runtime.Token token) -
getDescendants
-
collectDescendants
-
setRegion
-
setImaginary
public void setImaginary(boolean imaginary) -
isImaginary
public boolean isImaginary() -
getExtraTokens
-
setExtraTokens
-
getCommentTokens
-
setCommentTokens
-
toExtendedStringTreeItem
-
toExtendedStringTree
-
toExtendedStringTree
-