类 LayeredLexer


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

  • 构造器详细资料

    • LayeredLexer

      public LayeredLexer(Lexer baseLexer)
  • 方法详细资料

    • registerSelfStoppingLayer

      public void registerSelfStoppingLayer(Lexer lexer, IElementType[] startTokens, IElementType[] stopTokens)
    • registerLayer

      public void registerLayer(Lexer lexer, IElementType... startTokens)
    • findLayerLexer

      @Nullable protected @Nullable Lexer findLayerLexer(IElementType baseTokenType)
    • 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 在类中 DelegateLexer
      参数:
      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 在类中 DelegateLexer
      返回:
      the lexer state.
    • getTokenType

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

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

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

      public void advance()
      从类复制的说明: Lexer
      Advances the lexer to the next token.
      覆盖:
      advance 在类中 DelegateLexer
    • getCurrentPosition

      @NotNull public @NotNull LexerPosition getCurrentPosition()
      从类复制的说明: Lexer
      Returns the current position and state of the lexer.
      覆盖:
      getCurrentPosition 在类中 LexerBase
      返回:
      the lexer position and state.
    • restore

      public void restore(@NotNull @NotNull LexerPosition position)
      从类复制的说明: Lexer
      Restores the lexer to the specified state and position.
      覆盖:
      restore 在类中 LexerBase
      参数:
      position - the state and position to restore to.
    • isLayerActive

      protected boolean isLayerActive()