Package org.codehaus.groovy.antlr
Class GroovySourceAST
java.lang.Object
antlr.BaseAST
antlr.CommonAST
org.codehaus.groovy.antlr.GroovySourceAST
- All Implemented Interfaces:
AST,java.io.Serializable,java.lang.Comparable,SourceInfo
public class GroovySourceAST extends CommonAST implements java.lang.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:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description GroovySourceAST()GroovySourceAST(Token t) -
Method Summary
Modifier and Type Method Description GroovySourceASTchildAt(int position)GroovySourceASTchildOfType(int type)java.util.List<GroovySourceAST>childrenOfType(int type)intcompareTo(java.lang.Object object)intgetColumn()get starting columnintgetColumnLast()get ending columnintgetLine()get start lineintgetLineLast()get ending linejava.lang.StringgetSnippet()voidinitialize(AST ast)voidinitialize(Token t)voidsetColumn(int column)set start columnvoidsetColumnLast(int colLast)set ending columnvoidsetLast(Token last)voidsetLine(int line)set start linevoidsetLineLast(int lineLast)set ending linevoidsetSnippet(java.lang.String snippet)Methods 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, xmlSerializeRootOpenMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
GroovySourceAST
public GroovySourceAST() -
GroovySourceAST
-
-
Method Details
-
initialize
- Specified by:
initializein interfaceAST- Overrides:
initializein classCommonAST
-
initialize
- Specified by:
initializein interfaceAST- Overrides:
initializein classCommonAST
-
setLast
-
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 -
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 -
setSnippet
public void setSnippet(java.lang.String snippet) -
getSnippet
public java.lang.String getSnippet() -
compareTo
public int compareTo(java.lang.Object object)- Specified by:
compareToin interfacejava.lang.Comparable
-
childAt
-
childOfType
-
childrenOfType
-