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
Fields Modifier and Type Field Description protected AST
annotations
protected Integer
column
protected List<org.antlr.runtime.Token>
commentTokens
protected List<AST>
descendants
protected List<org.antlr.runtime.Token>
extraTokens
protected boolean
imaginary
protected Integer
line
protected IModule
module
protected HashMap<String,Object>
properties
protected Region
region
protected URI
uri
-
Constructor Summary
Constructors Constructor Description AST()
AST(org.antlr.runtime.Token token)
AST(org.antlr.runtime.Token token, URI uri)
AST(org.antlr.runtime.Token token, URI uri, IModule module)
AST(org.antlr.runtime.Token token, AST real)
AST(org.antlr.runtime.tree.CommonTree commontree)
-
Method Summary
-
Methods inherited from class org.antlr.runtime.tree.CommonTree
dupNode, getCharPositionInLine, getChildIndex, getText, getToken, getTokenStartIndex, getTokenStopIndex, getType, isNil, setChildIndex, setParent, setTokenStartIndex, setTokenStopIndex, setUnknownTokenBoundaries, toString
-
Methods 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 Detail
-
uri
protected URI uri
-
line
protected Integer line
-
column
protected Integer column
-
region
protected Region region
-
annotations
protected AST annotations
-
imaginary
protected boolean imaginary
-
extraTokens
protected List<org.antlr.runtime.Token> extraTokens
-
commentTokens
protected List<org.antlr.runtime.Token> commentTokens
-
module
protected IModule module
-
-
Method Detail
-
build
public void build()
-
getModule
public IModule getModule()
-
setModule
public void setModule(IModule module)
-
setUri
public void setUri(URI uri)
-
getAnnotationsAst
public AST getAnnotationsAst()
-
getBasename
public String getBasename()
Returns the basename of the URI of this AST, which is the last segment of its URI.getFile()
returnsnull
for non-file:///
URIs, which is correct in its own regard, but may produce NPEs in our case.
-
getFile
public File getFile()
-
getUri
public URI getUri()
-
getChildren
public List<AST> getChildren()
- Overrides:
getChildren
in classorg.antlr.runtime.tree.BaseTree
-
getParent
public AST getParent()
- Specified by:
getParent
in interfaceorg.antlr.runtime.tree.Tree
- Overrides:
getParent
in classorg.antlr.runtime.tree.CommonTree
-
setLine
public AST setLine(int line)
-
getLine
public int getLine()
- Specified by:
getLine
in interfaceorg.antlr.runtime.tree.Tree
- Overrides:
getLine
in classorg.antlr.runtime.tree.CommonTree
-
setColumn
public AST setColumn(int column)
-
getColumn
public int getColumn()
-
getNextSibling
public AST getNextSibling()
-
hasChildren
public boolean hasChildren()
-
getChild
public AST getChild(int i)
- Specified by:
getChild
in interfaceorg.antlr.runtime.tree.Tree
- Overrides:
getChild
in classorg.antlr.runtime.tree.BaseTree
-
getNumberOfChildren
public int getNumberOfChildren()
-
getFirstChild
public AST getFirstChild()
-
getSecondChild
public AST getSecondChild()
-
getThirdChild
public AST getThirdChild()
-
getFourthChild
public AST getFourthChild()
-
getLastChild
public AST getLastChild()
-
getRegion
public Region getRegion()
-
setToken
public void setToken(org.antlr.runtime.Token token)
-
collectDescendants
protected void collectDescendants(AST ast, List<AST> descendants, boolean addAst)
-
setRegion
public void setRegion(Region region)
-
setImaginary
public void setImaginary(boolean imaginary)
-
isImaginary
public boolean isImaginary()
-
getExtraTokens
public List<org.antlr.runtime.Token> getExtraTokens()
-
setExtraTokens
public void setExtraTokens(List<org.antlr.runtime.Token> extraTokens)
-
getCommentTokens
public List<org.antlr.runtime.Token> getCommentTokens()
-
setCommentTokens
public void setCommentTokens(List<org.antlr.runtime.Token> comments)
-
toExtendedStringTreeItem
public String toExtendedStringTreeItem()
-
toExtendedStringTree
public String toExtendedStringTree()
-
toExtendedStringTree
protected String toExtendedStringTree(int indent)
-
-