Skip to main content

Crate rustik_highlight

Crate rustik_highlight 

Source
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§

BlobHighlighter
Incremental highlighter for a complete text blob.
FontStyle
Bitset of font style flags.
Grammar
Immutable compiled grammar data.
GrammarQuery
Inputs used to select a grammar from a registry.
LineBuffer
Scratch space for highlighting one line without reallocating per call.
LineState
Per-line parser state.
LineTokenizer
Reusable line tokenizer for one compiled grammar.
LineTokens
Borrowed tokenization result for a line visited by a range highlighter.
OwnedLineTokens
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.
RawThemeRule
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.
ScopeSpan
Scope span produced by tokenization.
Style
Resolved style for a token.
StyleSpan
Fully styled span produced by applying a Theme to scope spans.
StyledLine
Borrowed tokenization and styling result for a line visited by a range highlighter.
Theme
Immutable compiled theme data.

Enums§

Error
Highlighting error.
GrammarKind
Tokenization strategy used by a grammar.

Constants§

MAX_INCLUDE_DEPTH
Maximum include depth when expanding $self, $base, and repository rules.