Vendor libtree-sitter.so (v0.26.8, wasmtime 44.0 statically linked) and call its C API through dart:ffi. Grammar WASM files are loaded by tree-sitter's embedded wasmtime engine via ts_wasm_store_load_language. 48 grammars compiled with tree-sitter build --wasm, 48 highlight queries (42 from upstream repos, 6 written in-house for comment, erlang, gdscript, gitignore, hcl, hlsl, swift). SQLite grammar replaces full SQL (974K-line parser exhausted RAM at compile time). Removes wasm_run and wasm_run_flutter — they downloaded a 22 MB binary from GitHub at first launch, violating the no-network-on- default-launch-path policy. Co-Authored-By: Claude <noreply@anthropic.com>
64 lines
747 B
Scheme
64 lines
747 B
Scheme
[
|
|
"("
|
|
")"
|
|
"(?"
|
|
"(?:"
|
|
"(?<"
|
|
"(?P<"
|
|
"(?P="
|
|
">"
|
|
"["
|
|
"]"
|
|
"{"
|
|
"}"
|
|
"[:"
|
|
":]"
|
|
] @punctuation.bracket
|
|
|
|
(group_name) @property
|
|
|
|
[
|
|
(identity_escape)
|
|
(control_letter_escape)
|
|
(character_class_escape)
|
|
(control_escape)
|
|
(start_assertion)
|
|
(end_assertion)
|
|
(boundary_assertion)
|
|
(non_boundary_assertion)
|
|
] @escape
|
|
|
|
[
|
|
"*"
|
|
"+"
|
|
"?"
|
|
"|"
|
|
"="
|
|
"!"
|
|
] @operator
|
|
|
|
(count_quantifier
|
|
[
|
|
(decimal_digits) @number
|
|
"," @punctuation.delimiter
|
|
])
|
|
|
|
(inline_flags_group
|
|
"-"? @operator
|
|
":"? @punctuation.delimiter)
|
|
|
|
(flags) @character.special
|
|
|
|
(character_class
|
|
[
|
|
"^" @operator
|
|
(class_range "-" @operator)
|
|
])
|
|
|
|
[
|
|
(class_character)
|
|
(posix_class_name)
|
|
] @constant.character
|
|
|
|
(pattern_character) @string
|