home / samples / Syntax Highlighting

Syntax Highlighting

Regex-based tokenizer with incremental state caching.

JavaScript

BuffeeSyntax(editor)
editor.Syntax.setLanguage('javascript')
editor.Syntax.enabled = true
Ln , Col |

State Cache Visualization

Shows the tokenizer state at the start of each visible line (0 = normal, 1+ = special states like multiline comment/string)