public abstract class MergingLexerAdapterBase extends DelegateLexer
myDelegate| Constructor and Description |
|---|
MergingLexerAdapterBase(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.
|
abstract MergeFunction |
getMergeFunction() |
Lexer |
getOriginal() |
int |
getState()
Returns the current state of the lexer.
|
int |
getTokenEnd()
Returns the end offset of the current token.
|
int |
getTokenStart()
Returns the start 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.
|
void |
start(java.lang.CharSequence buffer,
int startOffset,
int endOffset,
int initialState)
Prepare for lexing character data from
buffer passed. |
java.lang.String |
toString() |
getBufferEnd, getBufferSequence, getDelegategetTokenSequence, getTokenText, start, startpublic MergingLexerAdapterBase(Lexer original)
public abstract MergeFunction getMergeFunction()
public void start(java.lang.CharSequence buffer,
int startOffset,
int endOffset,
int initialState)
Lexerbuffer passed. Internal lexer state is supposed to be initialState. It is guaranteed
that the value of initialState is the same as returned by Lexer.getState() method of this lexer at condition startOffset=getTokenStart().
This method is used to incrementally re-lex changed characters using lexing data acquired from this particular lexer sometime in the past.start in class DelegateLexerbuffer - character data for lexing.startOffset - offset to start lexing fromendOffset - offset to stop lexing atinitialState - the initial state of the lexer.public int getState()
LexergetState in class DelegateLexerpublic IElementType getTokenType()
Lexernull if lexing is finished.getTokenType in class DelegateLexerpublic int getTokenStart()
LexergetTokenStart in class DelegateLexerpublic int getTokenEnd()
LexergetTokenEnd in class DelegateLexerpublic void advance()
Lexeradvance in class DelegateLexerpublic Lexer getOriginal()
public void restore(LexerPosition position)
Lexerpublic java.lang.String toString()
toString in class java.lang.Objectpublic LexerPosition getCurrentPosition()
LexergetCurrentPosition in class LexerBase