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>
80 lines
962 B
Scheme
80 lines
962 B
Scheme
(boolean_scalar) @boolean
|
|
|
|
(null_scalar) @constant.builtin
|
|
|
|
[
|
|
(double_quote_scalar)
|
|
(single_quote_scalar)
|
|
(block_scalar)
|
|
(string_scalar)
|
|
] @string
|
|
|
|
[
|
|
(integer_scalar)
|
|
(float_scalar)
|
|
] @number
|
|
|
|
(comment) @comment
|
|
|
|
[
|
|
(anchor_name)
|
|
(alias_name)
|
|
] @label
|
|
|
|
(tag) @type
|
|
|
|
[
|
|
(yaml_directive)
|
|
(tag_directive)
|
|
(reserved_directive)
|
|
] @attribute
|
|
|
|
(block_mapping_pair
|
|
key: (flow_node
|
|
[
|
|
(double_quote_scalar)
|
|
(single_quote_scalar)
|
|
] @property))
|
|
|
|
(block_mapping_pair
|
|
key: (flow_node
|
|
(plain_scalar
|
|
(string_scalar) @property)))
|
|
|
|
(flow_mapping
|
|
(_
|
|
key: (flow_node
|
|
[
|
|
(double_quote_scalar)
|
|
(single_quote_scalar)
|
|
] @property)))
|
|
|
|
(flow_mapping
|
|
(_
|
|
key: (flow_node
|
|
(plain_scalar
|
|
(string_scalar) @property))))
|
|
|
|
[
|
|
","
|
|
"-"
|
|
":"
|
|
">"
|
|
"?"
|
|
"|"
|
|
] @punctuation.delimiter
|
|
|
|
[
|
|
"["
|
|
"]"
|
|
"{"
|
|
"}"
|
|
] @punctuation.bracket
|
|
|
|
[
|
|
"*"
|
|
"&"
|
|
"---"
|
|
"..."
|
|
] @punctuation.special
|