KlynHighlighter
classin packageklyn.code.klyn
public class KlynHighlighter extends Object implements SyntaxHighlighter
└ KlynHighlighter
All Implemented Interfaces: 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.

Example
import klyn.code.klyn

highlighter = KlynHighlighter()
spans = highlighter.highlight("unit as CodeUnit = `K`")
Fields
Modifier and Type Member Description
public queryMode
queryMode as Boolean = false
Enables contextual KQL keywords and query types for the current line.
Inherited Properties
propertyInherited Properties from Object: type
Constructors
Modifier and Type Member Description
public KlynHighlighter Creates a highlighter initialized with the syntax supported by Klyn (KlynLanguage.profile()).
Methods
Modifier and Type Member Description
public highlight
highlight(line as String) as List<StyledSpan>
Highlights one Klyn source line without changing its text.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml