dymokomi/luce-textmate
Loads TextMate grammars (.tmLanguage.json) and tokenizes source a line at a time into scoped spans, so an editor can color any language by dropping in its grammar file. It matches with luce-regex and depends only on that plus the standard library.
A library written in luce-base. Latest release 0.6.1.
Install#
luc add dymokomi/luce-textmateDocumentation#
luce-textmate
Loads TextMate grammars (.tmLanguage.json) and tokenizes source a line at a time into scoped spans, so an editor can color any language by dropping in its grammar file. It matches with luce-regex and depends only on that plus the standard library.
The package parses grammar JSON with its own small reader that builds Luce values (objects, arrays, strings), because it needs to hold the parsed tree — the standard JSON decoder hands back borrowed cursors that a Luce program cannot keep.
Status: M2 in progress. json (the reader) is in; the grammar model and line tokenizer follow.
Dependencies#
| Package | Version |
|---|---|
| dymokomi/luce-json | newest |
| dymokomi/luce-regex | newest |
| dymokomi/luce-std | newest |
Versions#
0.6.1
Browse source · pack · commit 6bd209a2d5bc
SHA-256 c28ca32aa242f88f90edb31e334f75b8b06b830639a2cc7b9231d456653eb8d2
dependencies name no version