Class JooSymbol

  • All Implemented Interfaces:
    net.jangaroo.jooc.api.FilePosition

    public class JooSymbol
    extends java_cup.runtime.Symbol
    implements net.jangaroo.jooc.api.FilePosition
    Author:
    Andreas Gawecki
    • Constructor Detail

      • JooSymbol

        public JooSymbol​(String text)
      • JooSymbol

        public JooSymbol​(int sym,
                         String text)
      • JooSymbol

        public JooSymbol​(int sym,
                         String fileName,
                         int line,
                         int column,
                         String whitespace,
                         String text)
      • JooSymbol

        public JooSymbol​(int sym,
                         String fileName,
                         int line,
                         int column,
                         String whitespace,
                         String text,
                         Object jooValue)
    • Method Detail

      • replacingSymAndTextAndJooValue

        public JooSymbol replacingSymAndTextAndJooValue​(int sym,
                                                        String text,
                                                        Object jooValue)
      • withoutWhitespace

        public JooSymbol withoutWhitespace()
      • toString

        public String toString()
        Overrides:
        toString in class java_cup.runtime.Symbol
      • getText

        public String getText()
      • getWhitespace

        public String getWhitespace()
      • setWhitespace

        public void setWhitespace​(String whitespace)
        Use only for symbols that have just been created! Especially the MXML compiler often creates AST sub-trees and wants to copy over the white-space from the MXML element afterwards.
        Parameters:
        whitespace - the white-space to inject into this symbol
      • getSourceCode

        public String getSourceCode()
      • getJooValue

        public Object getJooValue()
      • getFileName

        public String getFileName()
        Specified by:
        getFileName in interface net.jangaroo.jooc.api.FilePosition
      • getLine

        public int getLine()
        Specified by:
        getLine in interface net.jangaroo.jooc.api.FilePosition
      • getColumn

        public int getColumn()
        Specified by:
        getColumn in interface net.jangaroo.jooc.api.FilePosition
      • isVirtual

        public boolean isVirtual()
      • isSemicolonInsertedBefore

        public boolean isSemicolonInsertedBefore()
      • setSemicolonInsertedBefore

        public void setSemicolonInsertedBefore​(boolean semicolonInsertedBefore)