Modifier and Type | Method and Description |
---|---|
static <T extends TokenId> |
create(Language<T> language,
int startSkipLength,
int endSkipLength)
Create language embedding that does not join embedded sections.
|
static <T extends TokenId> |
create(Language<T> language,
int startSkipLength,
int endSkipLength,
boolean joinSections)
Construct new language embedding for the given parameters
or get an existing cached one.
|
int |
endSkipLength()
Get length of the ending part of the token (for which the embedding
is being created) that should be skipped
so it will be excluded from lexing and no tokens will be created for it.
|
boolean |
joinSections()
Whether sections with this embedding should be joined with the other
sections with this embedding at the same level.
|
Language<T> |
language()
Get the embedded language.
|
int |
startSkipLength()
Get length of the initial part of the token (for which the embedding
is being created) that should be skipped
so it will be excluded from lexing and no tokens will be created for it.
|
String |
toString() |
public static <T extends TokenId> LanguageEmbedding<T> create(Language<T> language, int startSkipLength, int endSkipLength)
public static <T extends TokenId> LanguageEmbedding<T> create(Language<T> language, int startSkipLength, int endSkipLength, boolean joinSections)
language
- non-null language.startSkipLength
- >=0 number of characters in an initial part of the token
for which the language embedding is defined that should be excluded
from the embedded section. The excluded characters will not be lexed
and there will be no tokens created for them.endSkipLength
- >=0 number of characters at the end of the token
for which the language embedding is defined that should be excluded
from the embedded section. The excluded characters will not be lexed
and there will be no tokens created for them.joinSections
- whether sections with this embedding should be joined
across the input source or whether they should stay separate.
See also LanguageEmbedding.joinSections()
.public Language<T> language()
public int startSkipLength()
public int endSkipLength()
public boolean joinSections()
<!-- HTML comment start <% System.out.println("Hello"); %> still in HTML comment --<