@willbooster/tree-sitter-zig 1.0.2 → 1.0.3
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 -2
- package/grammar.js +1 -1
- package/package.json +4 -5
- package/tree-sitter-zig.wasm +0 -0
- package/tree-sitter.json +1 -1
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
[](https://github.com/WillBooster/tree-sitter-zig/actions/workflows/test.yml)
|
|
6
6
|
[](https://github.com/WillBooster/tree-sitter-zig/actions/workflows/test-rust.yml)
|
|
7
7
|
[](https://github.com/semantic-release/semantic-release)
|
|
8
|
-
[](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
|
|
9
9
|
[](https://crates.io/crates/willbooster-tree-sitter-zig)
|
|
10
10
|
|
|
11
11
|
Zig grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter), forked from
|
|
@@ -27,6 +27,7 @@ rejects it. It parses as the parser in upstream's 1.1.2 packages does, with thes
|
|
|
27
27
|
- A NUL character inside a token such as a string or a comment is part of that token, where upstream's lexer reports
|
|
28
28
|
an error.
|
|
29
29
|
|
|
30
|
+
- Zero-bit integers `u0` and `i0` are builtin types.
|
|
30
31
|
- Boolean negation is a `unary_expression`. Inferred error unions (`!T`) occur only in function return types;
|
|
31
32
|
their payload includes suffixes such as calls and field access (`!List(T)` or `!ns.Result`). Explicit error
|
|
32
33
|
unions (`E!T`) retain their error and payload types.
|
|
@@ -112,7 +113,8 @@ well (e.g. `script/tree-sitter parse file.zig`).
|
|
|
112
113
|
`bun run generate` records a fresh generation profile from the applicable `test/corpus` cases, then generates
|
|
113
114
|
compact parser tables. It would also profile files tracked in `examples/`, but this repository tracks none: upstream
|
|
114
115
|
ships neither examples nor a corpus, so the cases in `test/corpus` were written for this fork, with the trees upstream's
|
|
115
|
-
packaged parser gives them, except the
|
|
116
|
+
packaged parser gives them, except where the parsing differences listed above apply. Those cases pin this fork's
|
|
117
|
+
reading. The parser also embeds metadata from `tree-sitter.json`.
|
|
116
118
|
After changing a grammar, `tree-sitter.json`, or a corpus case, regenerate and commit `src/`.
|
|
117
119
|
Profiles in `.tmp/generation-profiles/` are temporary and must not be committed. `bun run build-wasm`, `bun run build/ci`,
|
|
118
120
|
and the release build regenerate the parsers before compiling them.
|
package/grammar.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@willbooster/tree-sitter-zig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.3",
|
|
4
4
|
"description": "Zig grammar for tree-sitter",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"incremental",
|
|
@@ -46,17 +46,16 @@
|
|
|
46
46
|
"@vitest/browser-playwright": "5.0.3",
|
|
47
47
|
"@willbooster/oxfmt-config": "1.2.2",
|
|
48
48
|
"@willbooster/oxlint-config": "1.4.8",
|
|
49
|
-
"@willbooster/wb": "22.
|
|
49
|
+
"@willbooster/wb": "22.26.1",
|
|
50
50
|
"@willbooster/web-tree-sitter": "2.0.1",
|
|
51
51
|
"conventional-changelog-conventionalcommits": "10.4.0",
|
|
52
|
-
"lefthook": "2.1
|
|
52
|
+
"lefthook": "2.2.1",
|
|
53
53
|
"oxfmt": "0.72.0",
|
|
54
54
|
"oxlint": "1.87.0",
|
|
55
|
-
"oxlint-tsgolint": "7.0.
|
|
55
|
+
"oxlint-tsgolint": "7.0.2004",
|
|
56
56
|
"playwright": "1.63.0",
|
|
57
57
|
"semantic-release": "25.0.9",
|
|
58
58
|
"sort-package-json": "4.0.0",
|
|
59
|
-
"typescript": "7.0.2",
|
|
60
59
|
"vitest": "5.0.3",
|
|
61
60
|
"wrangler": "4.147.0"
|
|
62
61
|
},
|
package/tree-sitter-zig.wasm
CHANGED
|
Binary file
|