SyntaxHighlighterFactory
classin packageklyn.code.highlighters
public class SyntaxHighlighterFactory extends Object
└ SyntaxHighlighterFactory

Resolves a syntax highlighter from a file path, supporting dedicated language highlighters as well as any language registered in klyn.code.LanguageRegistry.

Example
import klyn.code.highlighters

h = SyntaxHighlighterFactory.byPath("Main.kn")
spans = h.highlight("public class Main:")
Inherited Properties
propertyInherited Properties from Object: type
Methods
Modifier and Type Member Description
public static byPath
byPath(path as String) as SyntaxHighlighter
Returns a SyntaxHighlighter suitable for the file at path.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml