@willbooster/tree-sitter-zig 1.0.4 → 2.0.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 +5 -4
- package/package.json +3 -3
- package/tree-sitter-zig.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ to its authors and contributors. This is not an official release of that project
|
|
|
14
14
|
|
|
15
15
|
This fork builds on the grammar of upstream's version 1.1.2 and generates the parser with the
|
|
16
16
|
[WillBooster/tree-sitter](https://github.com/WillBooster/tree-sitter) generator. The parser carries that fork's own ABI
|
|
17
|
-
number (`
|
|
17
|
+
number (`0x57420006`) and loads only with that fork's runtime, version 7.0.5 or later in the 7.x series: upstream's tree-sitter runtime
|
|
18
18
|
rejects it. It parses as the parser in upstream's 1.1.2 packages does, with these exceptions:
|
|
19
19
|
|
|
20
20
|
- In the ranges a `for` loop iterates over, a range end whose first token can both start an expression and continue
|
|
@@ -40,7 +40,8 @@ rejects it. It parses as the parser in upstream's 1.1.2 packages does, with thes
|
|
|
40
40
|
## Usage
|
|
41
41
|
|
|
42
42
|
The npm package ships `tree-sitter-zig.wasm` for
|
|
43
|
-
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version
|
|
43
|
+
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 7.0.5 or later in the 7.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
|
|
44
|
+
In Node.js and Bun, load the grammar from its path:
|
|
44
45
|
|
|
45
46
|
```js
|
|
46
47
|
import { fileURLToPath } from 'node:url';
|
|
@@ -86,8 +87,8 @@ fuzzed with:
|
|
|
86
87
|
|
|
87
88
|
```toml
|
|
88
89
|
[dependencies]
|
|
89
|
-
tree-sitter = { package = "willbooster-tree-sitter", version = "
|
|
90
|
-
tree-sitter-zig = { package = "willbooster-tree-sitter-zig", version = "
|
|
90
|
+
tree-sitter = { package = "willbooster-tree-sitter", version = "7.0.5" }
|
|
91
|
+
tree-sitter-zig = { package = "willbooster-tree-sitter-zig", version = "2" }
|
|
91
92
|
```
|
|
92
93
|
|
|
93
94
|
```rust
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-zig",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Zig grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
48
48
|
"@willbooster/oxlint-config": "1.4.8",
|
|
49
49
|
"@willbooster/wb": "22.26.1",
|
|
50
|
-
"@willbooster/web-tree-sitter": "
|
|
50
|
+
"@willbooster/web-tree-sitter": "7.0.5",
|
|
51
51
|
"conventional-changelog-conventionalcommits": "10.4.0",
|
|
52
52
|
"lefthook": "2.2.1",
|
|
53
53
|
"oxfmt": "0.72.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"wrangler": "4.147.0"
|
|
61
61
|
},
|
|
62
62
|
"peerDependencies": {
|
|
63
|
-
"@willbooster/web-tree-sitter": "^
|
|
63
|
+
"@willbooster/web-tree-sitter": "^7.0.5"
|
|
64
64
|
},
|
|
65
65
|
"peerDependenciesMeta": {
|
|
66
66
|
"@willbooster/web-tree-sitter": {
|
package/tree-sitter-zig.wasm
CHANGED
|
Binary file
|