Skip to main content

Crate sql_dialect_fmt_highlight

Crate sql_dialect_fmt_highlight 

Source
Expand description

Lexical syntax highlighting for Snowflake SQL.

This layer intentionally starts from the lossless lexer. It is stable under grammar growth: new keywords are highlighted by keyword_kind, while newly-added punctuation only needs a SyntaxKind classification here before LSP/TextMate adapters consume it.

Re-exports§

pub use semantic::delta_encode;
pub use semantic::detect_injections;
pub use semantic::line_tokens;
pub use semantic::resolve_tokens;
pub use semantic::semantic_token;
pub use semantic::semantic_tokens;
pub use semantic::semantic_tokens_lsp;
pub use semantic::semantic_tokens_lsp_utf8;
pub use semantic::InjectedLanguage;
pub use semantic::Injection;
pub use semantic::LineToken;
pub use semantic::ResolvedToken;
pub use semantic::SemanticTokenModifiers;
pub use semantic::SemanticTokenType;
pub use semantic::SemanticTokens;

Modules§

semantic
LSP semantic-token mapping for the lexical highlighter.

Structs§

HighlightToken
A single highlighted token: a classified HighlightKind over a byte range of the source. #[non_exhaustive] so fields can be added without breaking downstream matches.
Highlighted
The result of highlight: a lossless token stream plus any lexer errors. #[non_exhaustive] so fields can be added without breaking downstream matches.

Enums§

HighlightKind

Functions§

classify
highlight