PythonHighlighter
classin packageklyn.code.python
public class PythonHighlighter extends Object implements SyntaxHighlighter
└ PythonHighlighter
All Implemented Interfaces: SyntaxHighlighter

Syntax highlighter for Python backed by klyn.code.python.PythonTokenizer.

Example
import klyn.code.python

spans = PythonHighlighter().highlight("def parse(text: str) -> list[str]:")
Inherited Properties
propertyInherited Properties from Object: type
Methods
Modifier and Type Member Description
public highlight
highlight(line as String) as List<StyledSpan>
Highlights one Python source line.
Inherited Methods
methodInherited Methods from Object: deepCopy, fromJson, hash, toDict, toJson, toMap, toString, toXml