java.lang.Object
com.intellij.lexer.Lexer
com.intellij.lexer.LexerBase
com.intellij.lexer.FlexAdapter
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidadvance()Advances the lexer to the next token.intReturns the offset at which the lexer will stop lexing.@NotNull CharSequenceReturns the buffer sequence over which the lexer is running.getFlex()intgetState()Returns the current state of the lexer.intReturns the end offset of the current token.intReturns the start offset of the current token.Returns the token at the current position of the lexer ornullif lexing is finished.protected voidvoidstart(@NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) Prepare for lexing character data frombufferpassed.toString()从类继承的方法 com.intellij.lexer.LexerBase
getCurrentPosition, restore从类继承的方法 com.intellij.lexer.Lexer
getTokenSequence, getTokenText, start, start
-
构造器详细资料
-
FlexAdapter
-
-
方法详细资料
-
getFlex
-
start
public void start(@NotNull @NotNull CharSequence buffer, int startOffset, int endOffset, int initialState) 从类复制的说明:LexerPrepare for lexing character data frombufferpassed. Internal lexer state is supposed to beinitialState. It is guaranteed that the value of initialState is the same as returned byLexer.getState()method of this lexer at conditionstartOffset=getTokenStart(). This method is used to incrementally re-lex changed characters using lexing data acquired from this particular lexer sometime in the past. -
getState
public int getState()从类复制的说明:LexerReturns the current state of the lexer. -
getTokenType
从类复制的说明:LexerReturns the token at the current position of the lexer ornullif lexing is finished.- 指定者:
getTokenType在类中Lexer- 返回:
- the current token.
-
getTokenStart
public int getTokenStart()从类复制的说明:LexerReturns the start offset of the current token.- 指定者:
getTokenStart在类中Lexer- 返回:
- the current token start offset.
-
getTokenEnd
public int getTokenEnd()从类复制的说明:LexerReturns the end offset of the current token.- 指定者:
getTokenEnd在类中Lexer- 返回:
- the current token end offset.
-
advance
public void advance()从类复制的说明:LexerAdvances the lexer to the next token. -
getBufferSequence
从类复制的说明:LexerReturns the buffer sequence over which the lexer is running. This method should return the same buffer instance which was passed to thestart()method.- 指定者:
getBufferSequence在类中Lexer- 返回:
- the lexer buffer.
-
getBufferEnd
public int getBufferEnd()从类复制的说明:LexerReturns the offset at which the lexer will stop lexing. This method should return the length of the buffer or the value passed in theendOffsetparameter to thestart()method.- 指定者:
getBufferEnd在类中Lexer- 返回:
- the lexing end offset
-
locateToken
protected void locateToken() -
toString
-