Package net.jangaroo.jooc
Class JooSymbol
- java.lang.Object
-
- java_cup.runtime.Symbol
-
- net.jangaroo.jooc.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 Summary
Constructors Constructor Description JooSymbol(int sym, String text)JooSymbol(int sym, String fileName, int line, int column, String whitespace, String text)JooSymbol(int sym, String fileName, int line, int column, String whitespace, String text, Object jooValue)JooSymbol(String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()StringgetFileName()ObjectgetJooValue()intgetLine()StringgetSourceCode()StringgetText()StringgetWhitespace()booleanisSemicolonInsertedBefore()booleanisVirtual()JooSymbolreplacingSymAndTextAndJooValue(int sym, String text, Object jooValue)voidsetSemicolonInsertedBefore(boolean semicolonInsertedBefore)voidsetWhitespace(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.StringtoString()JooSymbolvirtual()JooSymbolwithoutWhitespace()JooSymbolwithWhitespace(String whitespace)
-
-
-
Method Detail
-
replacingSymAndTextAndJooValue
public JooSymbol replacingSymAndTextAndJooValue(int sym, String text, Object jooValue)
-
withoutWhitespace
public JooSymbol withoutWhitespace()
-
toString
public String toString()
- Overrides:
toStringin classjava_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:
getFileNamein interfacenet.jangaroo.jooc.api.FilePosition
-
getLine
public int getLine()
- Specified by:
getLinein interfacenet.jangaroo.jooc.api.FilePosition
-
getColumn
public int getColumn()
- Specified by:
getColumnin interfacenet.jangaroo.jooc.api.FilePosition
-
isVirtual
public boolean isVirtual()
-
virtual
public JooSymbol virtual()
-
isSemicolonInsertedBefore
public boolean isSemicolonInsertedBefore()
-
setSemicolonInsertedBefore
public void setSemicolonInsertedBefore(boolean semicolonInsertedBefore)
-
-