Package org.codehaus.groovy.antlr
Class GroovySourceAST
java.lang.Object
antlr.BaseAST
antlr.CommonAST
org.codehaus.groovy.antlr.GroovySourceAST
- All Implemented Interfaces:
antlr.collections.AST,Serializable,Comparable,SourceInfo
We have an AST subclass so we can track source information.
Very odd that ANTLR doesn't do this by default.
- See Also:
-
Field Summary
Fields inherited from class antlr.BaseAST
down, right -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionchildAt(int position) childOfType(int type) childrenOfType(int type) intintget starting columnintget ending columnintgetLine()get start lineintget ending linevoidinitialize(antlr.collections.AST ast) voidinitialize(antlr.Token t) voidsetColumn(int column) set start columnvoidsetColumnLast(int colLast) set ending columnvoidsetLast(antlr.Token last) voidsetLine(int line) set start linevoidsetLineLast(int lineLast) set ending linevoidsetSnippet(String snippet) Methods inherited from class antlr.CommonAST
getText, getType, initialize, setText, setTypeMethods inherited from class antlr.BaseAST
addChild, decode, encode, equals, equalsList, equalsListPartial, equalsTree, equalsTreePartial, findAll, findAllPartial, getFirstChild, getNextSibling, getNumberOfChildren, getTokenNames, removeChildren, setFirstChild, setNextSibling, setVerboseStringConversion, toString, toStringList, toStringTree, xmlSerialize, xmlSerializeNode, xmlSerializeRootClose, xmlSerializeRootOpen
-
Constructor Details
-
GroovySourceAST
public GroovySourceAST() -
GroovySourceAST
public GroovySourceAST(antlr.Token t)
-
-
Method Details
-
initialize
public void initialize(antlr.collections.AST ast) - Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
initialize
public void initialize(antlr.Token t) - Specified by:
initializein interfaceantlr.collections.AST- Overrides:
initializein classantlr.CommonAST
-
setLast
public void setLast(antlr.Token last) -
getLineLast
public int getLineLast()Description copied from interface:SourceInfoget ending line- Specified by:
getLineLastin interfaceSourceInfo- Returns:
- the ending line
-
setLineLast
public void setLineLast(int lineLast) Description copied from interface:SourceInfoset ending line- Specified by:
setLineLastin interfaceSourceInfo- Parameters:
lineLast- the line
-
getColumnLast
public int getColumnLast()Description copied from interface:SourceInfoget ending column- Specified by:
getColumnLastin interfaceSourceInfo- Returns:
- the ending column
-
setColumnLast
public void setColumnLast(int colLast) Description copied from interface:SourceInfoset ending column- Specified by:
setColumnLastin interfaceSourceInfo- Parameters:
colLast- the column
-
setLine
public void setLine(int line) Description copied from interface:SourceInfoset start line- Specified by:
setLinein interfaceSourceInfo- Parameters:
line- the line
-
getLine
public int getLine()Description copied from interface:SourceInfoget start line- Specified by:
getLinein interfaceantlr.collections.AST- Specified by:
getLinein interfaceSourceInfo- Overrides:
getLinein classantlr.BaseAST- Returns:
- the starting line
-
setColumn
public void setColumn(int column) Description copied from interface:SourceInfoset start column- Specified by:
setColumnin interfaceSourceInfo- Parameters:
column- the column
-
getColumn
public int getColumn()Description copied from interface:SourceInfoget starting column- Specified by:
getColumnin interfaceantlr.collections.AST- Specified by:
getColumnin interfaceSourceInfo- Overrides:
getColumnin classantlr.BaseAST- Returns:
- the starting column
-
setSnippet
-
getSnippet
-
compareTo
- Specified by:
compareToin interfaceComparable
-
childAt
-
childOfType
-
childrenOfType
-