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. |
org.netbeans.spi.lexer |
The main abstract class in the Lexer SPI that must be implemented
is
LanguageHierarchy that mainly defines
set of token ids and token categories for the new language
and its Lexer . |
Modifier and Type | Method and Description |
---|---|
LanguagePath |
LanguagePath.embedded(Language<?> language)
Get embedded path of this language path.
|
LanguagePath |
LanguagePath.embedded(LanguagePath suffix)
Get language path corresponding to the suffix language path embedded
in this path.
|
static LanguagePath |
LanguagePath.get(Language<?> language)
Get language path that contains a single language.
|
static LanguagePath |
LanguagePath.get(LanguagePath prefix,
Language<?> language)
Get language path corresponding to the language embedded in the given context
language path.
|
LanguagePath |
TokenChange.languagePath()
Get the complete language path of the tokens contained
in this token sequence (containing outer language levels as well).
|
LanguagePath |
TokenSequence.languagePath()
Get the complete language path of the tokens contained
in this token sequence.
|
LanguagePath |
LanguagePath.parent()
Returns language path consisting of
<0, size() - 1>
languages (i.e. |
LanguagePath |
LanguagePath.subPath(int startIndex)
Gets the path starting at the given index and ending after
the last language contained in this path.
|
LanguagePath |
LanguagePath.subPath(int startIndex,
int endIndex)
Gets the path starting at the given index and ending after
the last language contained in this path.
|
Modifier and Type | Method and Description |
---|---|
LanguagePath |
LanguagePath.embedded(LanguagePath suffix)
Get language path corresponding to the suffix language path embedded
in this path.
|
boolean |
LanguagePath.endsWith(LanguagePath languagePath)
Check whether this language path ends with the given language path.
|
static LanguagePath |
LanguagePath.get(LanguagePath prefix,
Language<?> language)
Get language path corresponding to the language embedded in the given context
language path.
|
Object |
InputAttributes.getValue(LanguagePath languagePath,
Object attributeKey)
Get value for the given key for the particular language path.
|
void |
InputAttributes.setValue(LanguagePath languagePath,
Object attributeKey,
Object attributeValue,
boolean global)
Assign a new value to a property for the given language path.
|
List<TokenSequence<?>> |
TokenHierarchy.tokenSequenceList(LanguagePath languagePath,
int startOffset,
int endOffset)
Get immutable list of token sequences with the given language path
from this hierarchy.
|
Modifier and Type | Method and Description |
---|---|
LanguagePath |
LexerRestartInfo.languagePath()
Get language path at which the lexer operates.
|
Modifier and Type | Method and Description |
---|---|
protected LanguageEmbedding<?> |
LanguageHierarchy.embedding(Token<T> token,
LanguagePath languagePath,
InputAttributes inputAttributes)
Get language embedding (if exists) for a particular token
of the language at this level of language hierarchy.
|
abstract LanguageEmbedding<?> |
LanguageProvider.findLanguageEmbedding(Token<?> token,
LanguagePath languagePath,
InputAttributes inputAttributes)
Finds
LanguageEmbedding that will define what language is
embedded in a given token. |