Expand description
Syntax tokenization and theme application.
The crate keeps expensive work in the load/compile path. TextMate grammars compile into Oniguruma regex sets, JSON uses a dedicated lexer, scope names are interned, and the hot line APIs write into caller-owned buffers so editors and pagers can reuse allocations.
Modules§
- json
- Fast line-oriented JSON tokenization.
Structs§
- Blob
Highlighter - Incremental highlighter for a complete text blob.
- Font
Style - Bitset of font style flags.
- Grammar
- Immutable compiled grammar data.
- Grammar
Query - Inputs used to select a grammar from a registry.
- Line
Buffer - Scratch space for highlighting one line without reallocating per call.
- Line
State - Per-line parser state.
- Line
Tokenizer - Reusable line tokenizer for one compiled grammar.
- Line
Tokens - Borrowed tokenization result for a line visited by a range highlighter.
- Owned
Line Tokens - Owned tokenization result for APIs that collect highlighted lines.
- RawCapture
- A parsed, uncompiled TextMate capture.
- RawGrammar
- A parsed, uncompiled TextMate grammar.
- RawPattern
- A parsed, uncompiled TextMate pattern.
- RawStyle
- Parsed TextMate style settings.
- RawTheme
- A parsed, uncompiled TextMate theme.
- RawTheme
Rule - One parsed TextMate theme rule.
- Registry
- A reusable registry of compiled grammars and themes.
- Rgb
- RGB color parsed from a theme.
- ScopeId
- Interned scope identifier.
- Scope
Span - Scope span produced by tokenization.
- Style
- Resolved style for a token.
- Style
Span - Fully styled span produced by applying a
Themeto scope spans. - Styled
Line - Borrowed tokenization and styling result for a line visited by a range highlighter.
- Theme
- Immutable compiled theme data.
Enums§
- Error
- Highlighting error.
- Grammar
Kind - Tokenization strategy used by a grammar.
Constants§
- MAX_
INCLUDE_ DEPTH - Maximum include depth when expanding
$self,$base, and repository rules.