public class StoppableLexerAdapter extends DelegateLexer
Modifier and Type | Class and Description |
---|---|
static interface |
StoppableLexerAdapter.StoppingCondition |
myDelegate
Constructor and Description |
---|
StoppableLexerAdapter(StoppableLexerAdapter.StoppingCondition condition,
Lexer original) |
Modifier and Type | Method and Description |
---|---|
void |
advance()
Advances the lexer to the next token.
|
LexerPosition |
getCurrentPosition()
Returns the current position and state of the lexer.
|
int |
getPrevTokenEnd() |
int |
getTokenEnd()
Returns the end offset of the current token.
|
IElementType |
getTokenType()
Returns the token at the current position of the lexer or
null if lexing is finished. |
void |
restore(LexerPosition position)
Restores the lexer to the specified state and position.
|
getBufferEnd, getBufferSequence, getDelegate, getState, getTokenStart, start
getTokenSequence, getTokenText, start, start
public StoppableLexerAdapter(StoppableLexerAdapter.StoppingCondition condition, Lexer original)
public void advance()
Lexer
advance
in class DelegateLexer
public int getPrevTokenEnd()
public int getTokenEnd()
Lexer
getTokenEnd
in class DelegateLexer
public IElementType getTokenType()
Lexer
null
if lexing is finished.getTokenType
in class DelegateLexer
public LexerPosition getCurrentPosition()
Lexer
getCurrentPosition
in class LexerBase
public void restore(LexerPosition position)
Lexer