类 DelegateLexer

直接已知子类:
LayeredLexer, MergingLexerAdapterBase

public class DelegateLexer extends LexerBase
  • 字段详细资料

    • myDelegate

      protected final Lexer myDelegate
  • 构造器详细资料

    • DelegateLexer

      public DelegateLexer(@NotNull @NotNull Lexer delegate)
  • 方法详细资料

    • getDelegate

      public final Lexer getDelegate()
    • start

      public void start(@NotNull @NotNull CharSequence buffer, int startOffset, int endOffset, int initialState)
      从类复制的说明: Lexer
      Prepare for lexing character data from buffer 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 在类中 Lexer
      参数:
      buffer - character data for lexing.
      startOffset - offset to start lexing from
      endOffset - offset to stop lexing at
      initialState - the initial state of the lexer.
    • getState

      public int getState()
      从类复制的说明: Lexer
      Returns the current state of the lexer.
      指定者:
      getState 在类中 Lexer
      返回:
      the lexer state.
    • getTokenType

      @Nullable public @Nullable IElementType getTokenType()
      从类复制的说明: Lexer
      Returns the token at the current position of the lexer or null if lexing is finished.
      指定者:
      getTokenType 在类中 Lexer
      返回:
      the current token.
    • getTokenStart

      public int getTokenStart()
      从类复制的说明: Lexer
      Returns the start offset of the current token.
      指定者:
      getTokenStart 在类中 Lexer
      返回:
      the current token start offset.
    • getTokenEnd

      public int getTokenEnd()
      从类复制的说明: Lexer
      Returns the end offset of the current token.
      指定者:
      getTokenEnd 在类中 Lexer
      返回:
      the current token end offset.
    • advance

      public void advance()
      从类复制的说明: Lexer
      Advances the lexer to the next token.
      指定者:
      advance 在类中 Lexer
    • getBufferSequence

      @NotNull public final @NotNull CharSequence getBufferSequence()
      从类复制的说明: Lexer
      Returns the buffer sequence over which the lexer is running. This method should return the same buffer instance which was passed to the start() method.
      指定者:
      getBufferSequence 在类中 Lexer
      返回:
      the lexer buffer.
    • getBufferEnd

      public int getBufferEnd()
      从类复制的说明: Lexer
      Returns the offset at which the lexer will stop lexing. This method should return the length of the buffer or the value passed in the endOffset parameter to the start() method.
      指定者:
      getBufferEnd 在类中 Lexer
      返回:
      the lexing end offset