public class KlynHighlighter extends Object implements SyntaxHighlighter
Syntax highlighter for the complete Klyn lexical surface backed by klyn.code.klyn.KlynLanguage, klyn.code.klyn.KlynTokenizer, and the unified CodeHighlighter.
Delegates lexical analysis of comments, string prefixes, triple strings, Char and CodeUnit literals, regular expressions, numeric suffixes, annotations, contextual types, and KQL query blocks to KlynTokenizer.
import klyn.code.klyn
highlighter = KlynHighlighter()
spans = highlighter.highlight("unit as CodeUnit = `K`")| Modifier and Type | Member | Description |
|---|---|---|
| public | queryModequeryMode as Boolean = false |
Enables contextual KQL keywords and query types for the current line. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | KlynHighlighter | Creates a highlighter initialized with the syntax supported by Klyn (KlynLanguage.profile()). |
| Modifier and Type | Member | Description |
|---|---|---|
| public | highlighthighlight(line as String) as List<StyledSpan> |
Highlights one Klyn source line without changing its text. |