Package gw.internal.gosu.parser
Class StandardParserState
java.lang.Object
gw.internal.gosu.parser.LightweightParserState
gw.internal.gosu.parser.StandardParserState
- All Implemented Interfaces:
IFullParserState
,IParserState
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionStandardParserState
(IParsedElement elt, String src, boolean bKeepSymbolTableInIssues) StandardParserState
(ISymbolTable symTable, SourceCodeTokenizer tokenizer, int offsetShift, int lineShift, boolean bKeepSymbolTableInIssues) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Collapses the token captured by this parser state, if possibleboolean
void
setKeepSymbolTableInIssues
(boolean keepSymbolTableInIssues) void
setSymbolTable
(ISymbolTable table) Set the symbol table at the moment of creation of this IParserStateMethods inherited from class gw.internal.gosu.parser.LightweightParserState
cloneWithNewTokenStartAndTokenEnd, getLineNumber, getLineOffset, getSource, getTokenColumn, getTokenEnd, getTokenStart, init
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface gw.lang.parser.IParserState
cloneWithNewTokenStartAndTokenEnd, getLineNumber, getLineOffset, getSource, getTokenColumn, getTokenEnd, getTokenStart
-
Field Details
-
_symTable
-
_token
-
_bKeepSymbolTableInIssues
private boolean _bKeepSymbolTableInIssues
-
-
Constructor Details
-
StandardParserState
public StandardParserState(ISymbolTable symTable, SourceCodeTokenizer tokenizer, int offsetShift, int lineShift, boolean bKeepSymbolTableInIssues) -
StandardParserState
-
-
Method Details
-
getSymbolTable
- Specified by:
getSymbolTable
in interfaceIFullParserState
- Returns:
- the symbol table at the moment of creation of the parser state
-
setSymbolTable
Description copied from interface:IFullParserState
Set the symbol table at the moment of creation of this IParserState- Specified by:
setSymbolTable
in interfaceIFullParserState
-
collapseToken
public void collapseToken()Description copied from interface:IFullParserState
Collapses the token captured by this parser state, if possible- Specified by:
collapseToken
in interfaceIFullParserState
-
isKeepSymbolTableInIssues
public boolean isKeepSymbolTableInIssues()- Specified by:
isKeepSymbolTableInIssues
in interfaceIFullParserState
- Returns:
- true if parse issues need to retain this state's symbol table (e.g. in an IDE)
-
setKeepSymbolTableInIssues
public void setKeepSymbolTableInIssues(boolean keepSymbolTableInIssues)
-