java.lang.Object
com.intellij.psi.builder.FleetPsiBuilder<N>
- 所有已实现的接口:
PsiBuilder,SyntaxTreeBuilder,UserDataHolder
- 直接已知子类:
MarkerPsiBuilder
-
嵌套类概要
嵌套类从接口继承的嵌套类/接口 com.intellij.lang.PsiBuilder
PsiBuilder.Marker -
构造器概要
构造器构造器说明FleetPsiBuilder(@NotNull CharSequence text, @NotNull ITokenSequence tokens, @NotNull TokenSet whitespaceTokens, @NotNull TokenSet commentTokens, int startLexeme, int lexemeCount) -
方法概要
修饰符和类型方法说明voidAdvances the lexer to the next token, skipping whitespace and comment tokens.voidenforceCommentTokens(@NotNull TokenSet tokens) final booleaneof()Checks if the lexer has reached the end of file.voidAdds an error marker with the specified message text at the current position in the tree.intReturns the start offset of the current token, or the file length when the token stream is over.static @Nullable StringgetErrorMessage(@NotNull LighterASTNode node) @Nullable com.intellij.psi.builder.FleetPsiBuilder.StartMarker@NotNull CharSequenceReturns the complete text being parsed.@Nullable List<FleetPsiBuilder.ProductionMarker>abstract NgetRoot()@Nullable StringReturns the text of the current token from the lexer.@Nullable IElementTypeReturns the type of current token from the lexer.<T> TgetUserData(@NotNull Key<T> key) booleanisWhitespaceOrComment(@NotNull IElementType elementType) @Nullable IElementTypelookAhead(int steps) See what token type is instepsahead.@NotNull PsiBuilder.Markermark()Creates a marker at the current parsing position.<T> voidputUserData(@NotNull Key<T> key, T value) Add a new user data value to this object.rawLookup(int steps) See what token type is instepsahead/behind.intReturns the index of the current token in the original sequence.intrawTokenTypeStart(int steps) See what token type is instepsahead/behind current position.voidSlightly easier way to whatITokenTypeRemapperdoes (i.e. it just remaps current token to a given type).voidsetDebugMode(boolean dbgMode) Enables or disables the builder debug mode.voidsetTokenTypeRemapper(ITokenTypeRemapper remapper) Sets optional remapper that can change the type of tokens.voidsetWhitespaceSkippedCallback(@Nullable WhitespaceSkippedCallback callback) Subscribe for notification on default whitespace and comments skipped events.booleanwhitespaceOrComment(IElementType token) 从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait从接口继承的方法 com.intellij.lang.PsiBuilder
getTreeBuilt
-
构造器详细资料
-
FleetPsiBuilder
public FleetPsiBuilder(@NotNull @NotNull CharSequence text, @NotNull @NotNull ITokenSequence tokens, @NotNull @NotNull TokenSet whitespaceTokens, @NotNull @NotNull TokenSet commentTokens, int startLexeme, int lexemeCount)
-
-
方法详细资料
-
getRoot
-
isWhitespaceOrComment
- 指定者:
isWhitespaceOrComment在接口中SyntaxTreeBuilder
-
enforceCommentTokens
- 指定者:
enforceCommentTokens在接口中SyntaxTreeBuilder
-
getLatestDoneMarker
@Nullable public @Nullable com.intellij.psi.builder.FleetPsiBuilder.StartMarker getLatestDoneMarker()- 指定者:
getLatestDoneMarker在接口中SyntaxTreeBuilder- 返回:
- latest left done node for context dependent parsing.
-
getUserData
- 指定者:
getUserData在接口中PsiBuilder- 指定者:
getUserData在接口中UserDataHolder- 返回:
- a user data value associated with this object. Doesn't require read action.
-
putUserData
从接口复制的说明:PsiBuilderAdd a new user data value to this object. Doesn't require write action.- 指定者:
putUserData在接口中PsiBuilder- 指定者:
putUserData在接口中UserDataHolder
-
getOriginalText
从接口复制的说明:SyntaxTreeBuilderReturns the complete text being parsed.- 指定者:
getOriginalText在接口中SyntaxTreeBuilder- 返回:
- the text being parsed
-
getTokenType
从接口复制的说明:SyntaxTreeBuilderReturns the type of current token from the lexer.- 指定者:
getTokenType在接口中SyntaxTreeBuilder- 返回:
- the token type, or
nullwhen the token stream is over.
-
setTokenTypeRemapper
从接口复制的说明:SyntaxTreeBuilderSets optional remapper that can change the type of tokens. Output ofSyntaxTreeBuilder.getTokenType()is affected by it.- 指定者:
setTokenTypeRemapper在接口中SyntaxTreeBuilder- 参数:
remapper- the remapper object, ornull.
-
remapCurrentToken
从接口复制的说明:SyntaxTreeBuilderSlightly easier way to whatITokenTypeRemapperdoes (i.e. it just remaps current token to a given type).- 指定者:
remapCurrentToken在接口中SyntaxTreeBuilder- 参数:
type- new type for the current token.
-
lookAhead
从接口复制的说明:SyntaxTreeBuilderSee what token type is instepsahead.- 指定者:
lookAhead在接口中SyntaxTreeBuilder- 参数:
steps- 0 is current token (i.e. the sameSyntaxTreeBuilder.getTokenType()returns)- 返回:
- type element which
SyntaxTreeBuilder.getTokenType()will return if we call advancestepstimes in a row
-
rawLookup
从接口复制的说明:SyntaxTreeBuilderSee what token type is instepsahead/behind.- 指定者:
rawLookup在接口中SyntaxTreeBuilder- 参数:
steps- 0 is current token (i.e. the sameSyntaxTreeBuilder.getTokenType()returns)- 返回:
- type element ahead or behind, including whitespace/comment tokens
-
rawTokenTypeStart
public int rawTokenTypeStart(int steps) 从接口复制的说明:SyntaxTreeBuilderSee what token type is instepsahead/behind current position.- 指定者:
rawTokenTypeStart在接口中SyntaxTreeBuilder- 参数:
steps- 0 is current token (i.e. the sameSyntaxTreeBuilder.getTokenType()returns)- 返回:
- offset type element ahead or behind, including whitespace/comment tokens, -1 if first token,
getOriginalText().getLength()at end
-
rawTokenIndex
public int rawTokenIndex()从接口复制的说明:SyntaxTreeBuilderReturns the index of the current token in the original sequence.- 指定者:
rawTokenIndex在接口中SyntaxTreeBuilder- 返回:
- token index
-
setWhitespaceSkippedCallback
从接口复制的说明:SyntaxTreeBuilderSubscribe for notification on default whitespace and comments skipped events.- 指定者:
setWhitespaceSkippedCallback在接口中SyntaxTreeBuilder- 参数:
callback- an implementation for the callback
-
advanceLexer
public void advanceLexer()从接口复制的说明:SyntaxTreeBuilderAdvances the lexer to the next token, skipping whitespace and comment tokens.- 指定者:
advanceLexer在接口中SyntaxTreeBuilder
-
getCurrentOffset
public int getCurrentOffset()从接口复制的说明:SyntaxTreeBuilderReturns the start offset of the current token, or the file length when the token stream is over.- 指定者:
getCurrentOffset在接口中SyntaxTreeBuilder- 返回:
- the token offset.
-
getTokenText
从接口复制的说明:SyntaxTreeBuilderReturns the text of the current token from the lexer.- 指定者:
getTokenText在接口中SyntaxTreeBuilder- 返回:
- the token text, or
nullwhen the token stream is over.
-
whitespaceOrComment
-
mark
从接口复制的说明:SyntaxTreeBuilderCreates a marker at the current parsing position.- 指定者:
mark在接口中PsiBuilder- 指定者:
mark在接口中SyntaxTreeBuilder- 返回:
- the new marker instance.
-
eof
public final boolean eof()从接口复制的说明:SyntaxTreeBuilderChecks if the lexer has reached the end of file.- 指定者:
eof在接口中SyntaxTreeBuilder- 返回:
trueif the lexer is at end of file,falseotherwise.
-
error
从接口复制的说明:SyntaxTreeBuilderAdds an error marker with the specified message text at the current position in the tree.
Note: from series of subsequent errors messages only first will be part of resulting tree.- 指定者:
error在接口中SyntaxTreeBuilder- 参数:
messageText- the text of the error message displayed to the user.
-
getErrorMessage
-
setDebugMode
public void setDebugMode(boolean dbgMode) 从接口复制的说明:SyntaxTreeBuilderEnables or disables the builder debug mode. In debug mode, the builder will print stack trace to marker allocation position if one is not done when calling#getTreeBuilt().- 指定者:
setDebugMode在接口中SyntaxTreeBuilder- 参数:
dbgMode- the debug mode value.
-
getProductions
-