java.lang.Object
com.intellij.lang.impl.SyntaxTreeBuilderAdapter
- 所有已实现的接口:
SyntaxTreeBuilder
-
嵌套类概要
从接口继承的嵌套类/接口 com.intellij.lang.SyntaxTreeBuilder
SyntaxTreeBuilder.Marker -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidAdvances the lexer to the next token, skipping whitespace and comment tokens.voidenforceCommentTokens(@NotNull TokenSet tokens) 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.@NotNull SyntaxTreeBuilder@Nullable LighterASTNode@NotNull CharSequenceReturns the complete text being parsed.@Nullable @NonNls StringReturns the text of the current token from the lexer.@Nullable IElementTypeReturns the type of current token from the lexer.booleanisWhitespaceOrComment(@NotNull IElementType elementType) lookAhead(int steps) See what token type is instepsahead.@NotNull SyntaxTreeBuilder.Markermark()Creates a marker at the current parsing position.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.
-
字段详细资料
-
myDelegate
-
-
构造器详细资料
-
SyntaxTreeBuilderAdapter
-
-
方法详细资料
-
getDelegate
-
getOriginalText
从接口复制的说明:SyntaxTreeBuilderReturns the complete text being parsed.- 指定者:
getOriginalText在接口中SyntaxTreeBuilder- 返回:
- the text being parsed
-
advanceLexer
public void advanceLexer()从接口复制的说明:SyntaxTreeBuilderAdvances the lexer to the next token, skipping whitespace and comment tokens.- 指定者:
advanceLexer在接口中SyntaxTreeBuilder
-
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.
-
setWhitespaceSkippedCallback
从接口复制的说明:SyntaxTreeBuilderSubscribe for notification on default whitespace and comments skipped events.- 指定者:
setWhitespaceSkippedCallback在接口中SyntaxTreeBuilder- 参数:
callback- an implementation for the callback
-
isWhitespaceOrComment
- 指定者:
isWhitespaceOrComment在接口中SyntaxTreeBuilder
-
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
-
getTokenText
从接口复制的说明:SyntaxTreeBuilderReturns the text of the current token from the lexer.- 指定者:
getTokenText在接口中SyntaxTreeBuilder- 返回:
- the token text, or
nullwhen the token stream is over.
-
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.
-
mark
从接口复制的说明:SyntaxTreeBuilderCreates a marker at the current parsing position.- 指定者:
mark在接口中SyntaxTreeBuilder- 返回:
- the new marker instance.
-
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.
-
eof
public boolean eof()从接口复制的说明:SyntaxTreeBuilderChecks if the lexer has reached the end of file.- 指定者:
eof在接口中SyntaxTreeBuilder- 返回:
trueif the lexer is at end of file,falseotherwise.
-
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.
-
enforceCommentTokens
- 指定者:
enforceCommentTokens在接口中SyntaxTreeBuilder
-
getLatestDoneMarker
- 指定者:
getLatestDoneMarker在接口中SyntaxTreeBuilder- 返回:
- latest left done node for context dependent parsing.
-