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, startgetTokenSequence, getTokenText, start, startpublic StoppableLexerAdapter(StoppableLexerAdapter.StoppingCondition condition, Lexer original)
public void advance()
Lexeradvance in class DelegateLexerpublic int getPrevTokenEnd()
public int getTokenEnd()
LexergetTokenEnd in class DelegateLexerpublic IElementType getTokenType()
Lexernull if lexing is finished.getTokenType in class DelegateLexerpublic LexerPosition getCurrentPosition()
LexergetCurrentPosition in class LexerBasepublic void restore(LexerPosition position)
Lexer