@willbooster/tree-sitter-zig 4.1.0 → 5.0.1
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 +4 -4
- package/grammar.js +1 -1
- 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 (`0x5742000b`) and loads only with that fork's runtime, version 15.0.0 or later in the 15.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
|
|
@@ -44,7 +44,7 @@ rejects it. It parses as the parser in upstream's 1.1.2 packages does, with thes
|
|
|
44
44
|
## Usage
|
|
45
45
|
|
|
46
46
|
The npm package ships `tree-sitter-zig.wasm` for
|
|
47
|
-
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version
|
|
47
|
+
[@willbooster/web-tree-sitter](https://www.npmjs.com/package/@willbooster/web-tree-sitter) version 15.0.0 or later in the 15.x series, which runs in Node.js, Bun, browsers, and Cloudflare Workers.
|
|
48
48
|
In Node.js and Bun, load the grammar from its path:
|
|
49
49
|
|
|
50
50
|
```js
|
|
@@ -92,8 +92,8 @@ fuzzed with:
|
|
|
92
92
|
|
|
93
93
|
```toml
|
|
94
94
|
[dependencies]
|
|
95
|
-
tree-sitter = { package = "willbooster-tree-sitter", version = "
|
|
96
|
-
tree-sitter-zig = { package = "willbooster-tree-sitter-zig", version = "
|
|
95
|
+
tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" }
|
|
96
|
+
tree-sitter-zig = { package = "willbooster-tree-sitter-zig", version = "5" }
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
```rust
|
package/grammar.js
CHANGED
|
@@ -570,7 +570,7 @@ module.exports = grammar({
|
|
|
570
570
|
optional($.expression),
|
|
571
571
|
)),
|
|
572
572
|
|
|
573
|
-
try_expression: $ => prec.
|
|
573
|
+
try_expression: $ => prec.left(PREC.UNARY, seq('try', $.expression)),
|
|
574
574
|
|
|
575
575
|
catch_expression: $ => prec.right(PREC.BITWISE, seq(
|
|
576
576
|
$.expression,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-zig",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"description": "Zig grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@vitest/browser-playwright": "5.0.5",
|
|
51
51
|
"@willbooster/oxlint-config": "1.4.9",
|
|
52
52
|
"@willbooster/wb": "22.29.3",
|
|
53
|
-
"@willbooster/web-tree-sitter": "
|
|
53
|
+
"@willbooster/web-tree-sitter": "15.0.0",
|
|
54
54
|
"conventional-changelog-conventionalcommits": "10.4.1",
|
|
55
55
|
"lefthook": "2.2.2",
|
|
56
56
|
"oxlint": "1.88.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"wrangler": "4.151.1"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@willbooster/web-tree-sitter": "^
|
|
64
|
+
"@willbooster/web-tree-sitter": "^15.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependenciesMeta": {
|
|
67
67
|
"@willbooster/web-tree-sitter": {
|
package/tree-sitter-zig.wasm
CHANGED
|
Binary file
|