@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 CHANGED
@@ -5,7 +5,7 @@
5
5
  [![Test](https://github.com/WillBooster/tree-sitter-zig/actions/workflows/test.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-zig/actions/workflows/test.yml)
6
6
  [![Test rust](https://github.com/WillBooster/tree-sitter-zig/actions/workflows/test-rust.yml/badge.svg)](https://github.com/WillBooster/tree-sitter-zig/actions/workflows/test-rust.yml)
7
7
  [![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
8
- [![wbfy](https://img.shields.io/badge/wbfy-20.36.11-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-20.41.8-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
9
9
  [![crates.io](https://img.shields.io/crates/v/willbooster-tree-sitter-zig.svg)](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 NUL, `for` range, and empty-container cases, which pin this parser's reading. The parser also embeds metadata from `tree-sitter.json`.
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
@@ -48,7 +48,7 @@ const builtinTypes = [
48
48
  'c_longlong',
49
49
  'c_ulonglong',
50
50
  'c_longdouble',
51
- /(i|u)[1-9][0-9]*/,
51
+ /(i|u)(0|[1-9][0-9]*)/,
52
52
  ];
53
53
 
54
54
  module.exports = grammar({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-zig",
3
- "version": "1.0.2",
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.24.0",
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.16",
52
+ "lefthook": "2.2.1",
53
53
  "oxfmt": "0.72.0",
54
54
  "oxlint": "1.87.0",
55
- "oxlint-tsgolint": "7.0.2003",
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
  },
Binary file
package/tree-sitter.json CHANGED
@@ -15,7 +15,7 @@
15
15
  }
16
16
  ],
17
17
  "metadata": {
18
- "version": "1.0.2",
18
+ "version": "1.0.3",
19
19
  "license": "MIT",
20
20
  "description": "Zig grammar for tree-sitter",
21
21
  "authors": [