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 ASTannotationsprotected java.lang.Integercolumnprotected java.util.List<org.antlr.runtime.Token>commentTokensprotected java.util.List<AST>descendantsprotected java.util.List<org.antlr.runtime.Token>extraTokensprotected booleanimaginaryprotected java.lang.Integerlineprotected IModulemoduleprotected java.util.HashMap<java.lang.String,java.lang.Object>propertiesprotected Regionregionprotected java.net.URIuri
-
Constructor Summary
Constructors Constructor Description AST()AST(org.antlr.runtime.Token token)AST(org.antlr.runtime.Token token, java.net.URI uri)AST(org.antlr.runtime.Token token, java.net.URI uri, IModule module)AST(org.antlr.runtime.Token token, AST real)AST(org.antlr.runtime.tree.CommonTree commontree)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbuild()protected voidcollectDescendants(AST ast, java.util.List<AST> descendants, boolean addAst)ASTgetAnnotationsAst()java.lang.StringgetBasename()Returns the basename of the URI of this AST, which is the last segment of its URI.ASTgetChild(int i)java.util.List<AST>getChildren()intgetColumn()java.util.List<org.antlr.runtime.Token>getCommentTokens()java.util.List<AST>getDescendants()java.util.List<org.antlr.runtime.Token>getExtraTokens()java.io.FilegetFile()ASTgetFirstChild()ASTgetFourthChild()intgetLine()IModulegetModule()ASTgetNextSibling()intgetNumberOfChildren()ASTgetParent()java.util.HashMap<java.lang.String,java.lang.Object>getProperties()RegiongetRegion()ASTgetSecondChild()ASTgetThirdChild()java.net.URIgetUri()booleanhasChildren()booleanisImaginary()ASTsetAnnotationsAst(AST annotations)ASTsetColumn(int column)voidsetCommentTokens(java.util.List<org.antlr.runtime.Token> comments)voidsetExtraTokens(java.util.List<org.antlr.runtime.Token> extraTokens)ASTsetFirstChild(AST child)voidsetImaginary(boolean imaginary)ASTsetLine(int line)voidsetModule(IModule module)ASTsetNextSibling(AST sibling)voidsetRegion(Region region)voidsetToken(org.antlr.runtime.Token token)voidsetUri(java.net.URI uri)java.lang.StringtoExtendedStringTree()protected java.lang.StringtoExtendedStringTree(int indent)java.lang.StringtoExtendedStringTreeItem()-
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 java.net.URI uri
-
line
protected java.lang.Integer line
-
column
protected java.lang.Integer column
-
region
protected Region region
-
annotations
protected AST annotations
-
imaginary
protected boolean imaginary
-
extraTokens
protected java.util.List<org.antlr.runtime.Token> extraTokens
-
commentTokens
protected java.util.List<org.antlr.runtime.Token> commentTokens
-
descendants
protected java.util.List<AST> descendants
-
module
protected IModule module
-
properties
protected java.util.HashMap<java.lang.String,java.lang.Object> properties
-
-
Constructor Detail
-
AST
public AST()
-
AST
public AST(org.antlr.runtime.tree.CommonTree commontree)
-
AST
public AST(org.antlr.runtime.Token token, AST real)
-
AST
public AST(org.antlr.runtime.Token token)
-
AST
public AST(org.antlr.runtime.Token token, java.net.URI uri)
-
AST
public AST(org.antlr.runtime.Token token, java.net.URI uri, IModule module)
-
-
Method Detail
-
build
public void build()
-
getModule
public IModule getModule()
-
setModule
public void setModule(IModule module)
-
setUri
public void setUri(java.net.URI uri)
-
getAnnotationsAst
public AST getAnnotationsAst()
-
getProperties
public java.util.HashMap<java.lang.String,java.lang.Object> getProperties()
-
getBasename
public java.lang.String 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
public java.io.File getFile()
-
getUri
public java.net.URI getUri()
-
getChildren
public java.util.List<AST> getChildren()
- Overrides:
getChildrenin classorg.antlr.runtime.tree.BaseTree
-
getParent
public AST getParent()
- Specified by:
getParentin interfaceorg.antlr.runtime.tree.Tree- Overrides:
getParentin classorg.antlr.runtime.tree.CommonTree
-
setLine
public AST setLine(int line)
-
getLine
public int getLine()
- Specified by:
getLinein interfaceorg.antlr.runtime.tree.Tree- Overrides:
getLinein 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:
getChildin interfaceorg.antlr.runtime.tree.Tree- Overrides:
getChildin 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()
-
getRegion
public Region getRegion()
-
setToken
public void setToken(org.antlr.runtime.Token token)
-
getDescendants
public java.util.List<AST> getDescendants()
-
collectDescendants
protected void collectDescendants(AST ast, java.util.List<AST> descendants, boolean addAst)
-
setRegion
public void setRegion(Region region)
-
setImaginary
public void setImaginary(boolean imaginary)
-
isImaginary
public boolean isImaginary()
-
getExtraTokens
public java.util.List<org.antlr.runtime.Token> getExtraTokens()
-
setExtraTokens
public void setExtraTokens(java.util.List<org.antlr.runtime.Token> extraTokens)
-
getCommentTokens
public java.util.List<org.antlr.runtime.Token> getCommentTokens()
-
setCommentTokens
public void setCommentTokens(java.util.List<org.antlr.runtime.Token> comments)
-
toExtendedStringTreeItem
public java.lang.String toExtendedStringTreeItem()
-
toExtendedStringTree
public java.lang.String toExtendedStringTree()
-
toExtendedStringTree
protected java.lang.String toExtendedStringTree(int indent)
-
-