Classes
PlaintextStateMachineLexer
1
▼
Plaintext lexer - no syntax highlighting, just renders as plain text.
PlaintextStateMachineLexer
1
▼
Plaintext lexer - no syntax highlighting, just renders as plain text.
Methods
tokenize
4
Iterator[Token]
▼
Tokenize plaintext by splitting into whitespace and text chunks.
tokenize
4
Iterator[Token]
▼
def tokenize(self, code: str, config: LexerConfig | None = None, *, start: int = 0, end: int | None = None) -> Iterator[Token]
Parameters
| Name | Type | Description |
|---|---|---|
code |
— |
The source code to tokenize. |
config |
— |
Optional lexer configuration. Default:None
|
start |
— |
Starting index in the source string. Default:0
|
end |
— |
Optional ending index in the source string. Default:None
|
Returns
Iterator[Token]