Classes
LexerDelegate
2
▼
Protocol for sub-lexers that process source ranges.
Thread Safety:
Implementations must be sta…
LexerDelegate
2
▼
Protocol for sub-lexers that process source ranges.
Thread Safety:
Implementations must be stateless or use only local variables.
The source string is read-only shared state.
Methods
tokenize_range
4
Iterator[Any]
▼
Tokenize a specific range of the source string.
tokenize_range
4
Iterator[Any]
▼
def tokenize_range(self, source: str, start: int, end: int, language: str) -> Iterator[Any]
Parameters
| Name | Type | Description |
|---|---|---|
source |
— |
The complete source buffer (read-only) |
start |
— |
Start index (inclusive) |
end |
— |
End index (exclusive) |
language |
— |
Language identifier for lexer selection |
Returns
Iterator[Any]
supports_language
1
bool
▼
Check if this delegate can handle the given language.
supports_language
1
bool
▼
def supports_language(self, language: str) -> bool
Parameters
| Name | Type | Description |
|---|---|---|
language |
— |
Returns
bool