类 AbstractIndentParser

java.lang.Object
com.intellij.indentation.AbstractIndentParser
所有已实现的接口:
PsiParser

public abstract class AbstractIndentParser extends Object implements PsiParser
  • 字段详细资料

  • 构造器详细资料

    • AbstractIndentParser

      public AbstractIndentParser()
  • 方法详细资料

    • parse

      @NotNull public @NotNull ASTNode parse(@NotNull @NotNull IElementType root, @NotNull @NotNull PsiBuilder builder)
      从接口复制的说明: PsiParser
      Parses the contents of the specified PSI builder and returns an AST tree with the specified type of root element. The PSI builder contents is the entire file or (if chameleon tokens are used) the text of a chameleon token which needs to be reparsed.
      指定者:
      parse 在接口中 PsiParser
      参数:
      root - the type of the root element in the AST tree.
      builder - the builder which is used to retrieve the original file tokens and build the AST tree.
      返回:
      the root of the resulting AST tree.
    • createPsiBuilder

      @NotNull protected @NotNull IndentPsiBuilder createPsiBuilder(@NotNull @NotNull PsiBuilder builder)
    • parseRoot

      protected abstract void parseRoot(IElementType root)
    • mark

      public PsiBuilder.Marker mark(boolean couldBeRolledBack)
    • mark

      public PsiBuilder.Marker mark()
    • done

      public void done(@NotNull PsiBuilder.Marker marker, @NotNull @NotNull IElementType elementType)
    • collapse

      public static void collapse(@NotNull PsiBuilder.Marker marker, @NotNull @NotNull IElementType elementType)
    • drop

      protected static void drop(@NotNull PsiBuilder.Marker marker)
    • rollbackTo

      protected void rollbackTo(@NotNull PsiBuilder.Marker marker)
    • eof

      protected boolean eof()
    • getCurrentOffset

      protected int getCurrentOffset()
    • getCurrentIndent

      public int getCurrentIndent()
    • error

      protected void error(@NotNull @NotNull String message)
    • getTokenType

      @Nullable public @Nullable IElementType getTokenType()
    • tokenIn

      protected static boolean tokenIn(@Nullable @Nullable IElementType elementType, IElementType... tokens)
    • currentTokenIn

      protected boolean currentTokenIn(IElementType... tokens)
    • currentTokenIn

      protected boolean currentTokenIn(@NotNull @NotNull TokenSet tokenSet)
    • getTokenText

      @NotNull protected @NotNull String getTokenText()
    • expect

      protected boolean expect(@NotNull @NotNull IElementType elementType)
    • expect

      protected boolean expect(@NotNull @NotNull IElementType elementType, @NotNull @NotNull String expectedMessage)
    • lookAhead

      @Nullable public @Nullable IElementType lookAhead(int step)
    • rawLookup

      @Nullable public @Nullable IElementType rawLookup(int step)
    • isNewLine

      public boolean isNewLine()
    • advance

      public void advance()
    • recalculateCurrentIndent

      public void recalculateCurrentIndent()
    • advanceUntil

      protected void advanceUntil(TokenSet tokenSet)
    • advanceUntilEol

      protected void advanceUntilEol()
    • errorUntil

      protected void errorUntil(TokenSet tokenSet, @NotNull @NotNull String message)
    • errorUntilEol

      protected void errorUntilEol(@NotNull @NotNull String message)
    • errorUntilEof

      protected void errorUntilEof()
    • expectEolOrEof

      protected void expectEolOrEof()
    • getIndentElementType

      protected abstract IElementType getIndentElementType()
    • getEolElementType

      protected abstract IElementType getEolElementType()