Package | Description |
---|---|
org.netbeans.api.lexer |
The entrance point into Lexer API is
TokenHierarchy class with
its static methods that provide its instance for the given input source. |
Modifier and Type | Method and Description |
---|---|
TokenSequence<T> |
TokenChange.currentTokenSequence()
Get the token sequence that corresponds to the current state
of the token hierarchy.
|
TokenSequence<?> |
TokenSequence.embedded()
Get embedded token sequence if the token
to which this token sequence is currently positioned
has a language embedding.
|
<ET extends TokenId> |
TokenSequence.embedded(Language<ET> embeddedLanguage)
Get embedded token sequence if the token
to which this token sequence is currently positioned
has a language embedding.
|
TokenSequence<?> |
TokenSequence.embeddedJoined()
Get embedded token sequence that possibly joins multiple embeddings
with the same language paths (if the embeddings allow it - see
LanguageEmbedding.joinSections() ) into a single input text
which is then lexed as a single continuous text. |
<ET extends TokenId> |
TokenSequence.embeddedJoined(Language<ET> embeddedLanguage)
Get embedded token sequence if the token
to which this token sequence is currently positioned
has a language embedding.
|
TokenSequence<T> |
TokenChange.removedTokenSequence()
Create token sequence over the removed tokens.
|
TokenSequence<T> |
TokenSequence.subSequence(int startOffset)
Create sub sequence of this token sequence that only returns
tokens above the given offset.
|
TokenSequence<T> |
TokenSequence.subSequence(int startOffset,
int endOffset)
Create sub sequence of this token sequence that only returns
tokens between the given offsets.
|
TokenSequence<?> |
TokenHierarchy.tokenSequence()
Get token sequence of the top level language of the token hierarchy.
|
<T extends TokenId> |
TokenHierarchy.tokenSequence(Language<T> language)
Get token sequence of the top level of the language hierarchy
only if it's of the given language.
|