@cavelang/tree-sitter-cave 0.29.1 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -5
- package/package.json +5 -8
- package/src/parser.c +2 -2
- package/tree-sitter-cave.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -19,11 +19,29 @@ values include negative scalars and negative trajectory endpoints.
|
|
|
19
19
|
the single source used by `@cavelang/highlight` (terminal ANSI) and the
|
|
20
20
|
CAVE VSCode extension (semantic tokens), including trajectory arrows as
|
|
21
21
|
operators
|
|
22
|
-
- `src/`
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
22
|
+
- `src/` and `tree-sitter-cave.wasm` are committed generated artifacts.
|
|
23
|
+
`pnpm grammar:verify` regenerates both with the pinned toolchain and fails
|
|
24
|
+
when the result differs, so grammar changes remain reviewable.
|
|
25
|
+
|
|
26
|
+
## Rebuilding
|
|
27
|
+
|
|
28
|
+
`pnpm --filter @cavelang/tree-sitter-cave build` downloads the exact
|
|
29
|
+
tree-sitter CLI and WASI SDK archives listed in
|
|
30
|
+
`scripts/grammar-toolchain.json`, verifies their SHA-256 digests, and caches
|
|
31
|
+
them under `~/.cache/cave/grammar-toolchain`. Package installation itself
|
|
32
|
+
does not run a binary downloader.
|
|
33
|
+
|
|
34
|
+
For an offline or pre-provisioned build, copy the two archives for the host
|
|
35
|
+
platform into `$CAVE_GRAMMAR_CACHE/downloads` (the variable defaults to the
|
|
36
|
+
cache path above), then run:
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
CAVE_GRAMMAR_OFFLINE=1 pnpm grammar:prepare
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Offline mode never accesses the network and reports the missing or invalid
|
|
43
|
+
archive, its expected digest, and the recovery command. Cached archives are
|
|
44
|
+
digest-checked on every invocation before an extracted tool is used.
|
|
27
45
|
|
|
28
46
|
## Consuming
|
|
29
47
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cavelang/tree-sitter-cave",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Tree-sitter grammar for CAVE — the canonical grammar artifact behind editor and terminal highlighting.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cave",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"directory": "packages/tree-sitter-cave"
|
|
21
21
|
},
|
|
22
22
|
"engines": {
|
|
23
|
-
"node": "
|
|
23
|
+
"node": "^22.18.0 || ^24.0.0"
|
|
24
24
|
},
|
|
25
25
|
"exports": {
|
|
26
26
|
"./wasm": "./tree-sitter-cave.wasm",
|
|
@@ -40,13 +40,10 @@
|
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"tree-sitter-cli": "^0.26.10"
|
|
45
|
-
},
|
|
46
43
|
"scripts": {
|
|
47
|
-
"generate": "
|
|
48
|
-
"build": "
|
|
49
|
-
"test": "
|
|
44
|
+
"generate": "node ../../scripts/grammar-toolchain.mjs generate",
|
|
45
|
+
"build": "node ../../scripts/grammar-toolchain.mjs build",
|
|
46
|
+
"test": "node ../../scripts/grammar-toolchain.mjs test",
|
|
50
47
|
"typecheck": "true"
|
|
51
48
|
}
|
|
52
49
|
}
|
package/src/parser.c
CHANGED
|
@@ -2889,8 +2889,8 @@ TS_PUBLIC const TSLanguage *tree_sitter_cave(void) {
|
|
|
2889
2889
|
.max_reserved_word_set_size = 0,
|
|
2890
2890
|
.metadata = {
|
|
2891
2891
|
.major_version = 0,
|
|
2892
|
-
.minor_version =
|
|
2893
|
-
.patch_version =
|
|
2892
|
+
.minor_version = 31,
|
|
2893
|
+
.patch_version = 0,
|
|
2894
2894
|
},
|
|
2895
2895
|
};
|
|
2896
2896
|
return &language;
|
package/tree-sitter-cave.wasm
CHANGED
|
Binary file
|