Class 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
    • Constructor Detail

      • GroovySourceAST

        public GroovySourceAST()
      • GroovySourceAST

        public GroovySourceAST​(Token t)
    • Method Detail

      • setLast

        public void setLast​(Token last)
      • getLineLast

        public int getLineLast()
        Description copied from interface: SourceInfo
        get ending line
        Specified by:
        getLineLast in interface SourceInfo
        Returns:
        the ending line
      • setLineLast

        public void setLineLast​(int lineLast)
        Description copied from interface: SourceInfo
        set ending line
        Specified by:
        setLineLast in interface SourceInfo
        Parameters:
        lineLast - the line
      • getColumnLast

        public int getColumnLast()
        Description copied from interface: SourceInfo
        get ending column
        Specified by:
        getColumnLast in interface SourceInfo
        Returns:
        the ending column
      • setColumnLast

        public void setColumnLast​(int colLast)
        Description copied from interface: SourceInfo
        set ending column
        Specified by:
        setColumnLast in interface SourceInfo
        Parameters:
        colLast - the column
      • setLine

        public void setLine​(int line)
        Description copied from interface: SourceInfo
        set start line
        Specified by:
        setLine in interface SourceInfo
        Parameters:
        line - the line
      • setColumn

        public void setColumn​(int column)
        Description copied from interface: SourceInfo
        set start column
        Specified by:
        setColumn in interface SourceInfo
        Parameters:
        column - the 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:
        compareTo in interface java.lang.Comparable
      • childrenOfType

        public java.util.List<GroovySourceAST> childrenOfType​(int type)