@willbooster/tree-sitter-zig 8.0.0 → 9.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 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.51.1-1e90ff.svg)](https://github.com/WillBooster/shared/tree/main/packages/wbfy)
8
+ [![wbfy](https://img.shields.io/badge/wbfy-21.3.0-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
@@ -34,7 +34,8 @@ rejects it. It parses as the parser in upstream's 1.1.2 packages does, with thes
34
34
  Code that handles every comment kind must match all three node types.
35
35
 
36
36
  - Error sets are accepted directly as container field types, and pointer, slice and array element types may be conditional.
37
- - `async` and `await` are ordinary identifiers. Assembly clobbers use an expression, including an anonymous struct
37
+ - `async`, `await`, and `usingnamespace` are ordinary identifiers. Removed `usingnamespace` declarations produce syntax
38
+ errors. Assembly clobbers use an expression, including an anonymous struct
38
39
  initializer, as in Zig 0.16.
39
40
  - Zero-bit integers `u0` and `i0` are builtin types.
40
41
  - Quoted identifiers such as `@"hello world"` expose their content directly inside `identifier`, without a nested
@@ -106,10 +107,9 @@ In Rust, depend on the [crate](https://crates.io/crates/willbooster-tree-sitter-
106
107
  [willbooster-tree-sitter](https://crates.io/crates/willbooster-tree-sitter), the runtime this package is tested and
107
108
  fuzzed with:
108
109
 
109
- ```toml
110
- [dependencies]
111
- tree-sitter = { package = "willbooster-tree-sitter", version = "15.0.0" }
112
- tree-sitter-zig = { package = "willbooster-tree-sitter-zig", version = "6" }
110
+ ```sh
111
+ cargo add willbooster-tree-sitter@15.0.0 --rename tree-sitter
112
+ cargo add willbooster-tree-sitter-zig --rename tree-sitter-zig
113
113
  ```
114
114
 
115
115
  ```rust
package/grammar.js CHANGED
@@ -103,7 +103,6 @@ module.exports = grammar({
103
103
  $.comptime_declaration,
104
104
  $.variable_declaration,
105
105
  $.function_declaration,
106
- $.using_namespace_declaration,
107
106
  seq($.container_field, ','),
108
107
  )),
109
108
  optional($.container_field),
@@ -234,13 +233,6 @@ module.exports = grammar({
234
233
  '...',
235
234
  ),
236
235
 
237
- using_namespace_declaration: $ => seq(
238
- optional('pub'),
239
- 'usingnamespace',
240
- $.expression,
241
- ';',
242
- ),
243
-
244
236
  block: $ => seq(
245
237
  '{',
246
238
  repeat($.statement),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-zig",
3
- "version": "8.0.0",
3
+ "version": "9.0.0",
4
4
  "description": "Zig grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -49,7 +49,7 @@
49
49
  "@types/bun": "1.4.4",
50
50
  "@vitest/browser-playwright": "5.0.5",
51
51
  "@willbooster/oxlint-config": "1.4.9",
52
- "@willbooster/wb": "22.32.3",
52
+ "@willbooster/wb": "23.0.2",
53
53
  "@willbooster/web-tree-sitter": "15.0.0",
54
54
  "conventional-changelog-conventionalcommits": "10.4.1",
55
55
  "lefthook": "2.2.2",
@@ -58,7 +58,7 @@
58
58
  "playwright": "1.64.1",
59
59
  "semantic-release": "25.0.9",
60
60
  "vitest": "5.0.5",
61
- "wrangler": "4.151.1"
61
+ "wrangler": "4.152.0"
62
62
  },
63
63
  "peerDependencies": {
64
64
  "@willbooster/web-tree-sitter": "^15.0.0"
@@ -1237,10 +1237,6 @@
1237
1237
  "type": "test_declaration",
1238
1238
  "named": true
1239
1239
  },
1240
- {
1241
- "type": "using_namespace_declaration",
1242
- "named": true
1243
- },
1244
1240
  {
1245
1241
  "type": "variable_declaration",
1246
1242
  "named": true
@@ -1979,10 +1975,6 @@
1979
1975
  "type": "test_declaration",
1980
1976
  "named": true
1981
1977
  },
1982
- {
1983
- "type": "using_namespace_declaration",
1984
- "named": true
1985
- },
1986
1978
  {
1987
1979
  "type": "variable_declaration",
1988
1980
  "named": true
@@ -2211,10 +2203,6 @@
2211
2203
  "type": "test_declaration",
2212
2204
  "named": true
2213
2205
  },
2214
- {
2215
- "type": "using_namespace_declaration",
2216
- "named": true
2217
- },
2218
2206
  {
2219
2207
  "type": "variable_declaration",
2220
2208
  "named": true
@@ -2269,10 +2257,6 @@
2269
2257
  "type": "test_declaration",
2270
2258
  "named": true
2271
2259
  },
2272
- {
2273
- "type": "using_namespace_declaration",
2274
- "named": true
2275
- },
2276
2260
  {
2277
2261
  "type": "variable_declaration",
2278
2262
  "named": true
@@ -2476,10 +2460,6 @@
2476
2460
  "type": "test_declaration",
2477
2461
  "named": true
2478
2462
  },
2479
- {
2480
- "type": "using_namespace_declaration",
2481
- "named": true
2482
- },
2483
2463
  {
2484
2464
  "type": "variable_declaration",
2485
2465
  "named": true
@@ -2487,21 +2467,6 @@
2487
2467
  ]
2488
2468
  }
2489
2469
  },
2490
- {
2491
- "type": "using_namespace_declaration",
2492
- "named": true,
2493
- "fields": {},
2494
- "children": {
2495
- "multiple": false,
2496
- "required": true,
2497
- "types": [
2498
- {
2499
- "type": "expression",
2500
- "named": true
2501
- }
2502
- ]
2503
- }
2504
- },
2505
2470
  {
2506
2471
  "type": "variable_declaration",
2507
2472
  "named": true,
@@ -3211,10 +3176,6 @@
3211
3176
  "type": "unreachable",
3212
3177
  "named": false
3213
3178
  },
3214
- {
3215
- "type": "usingnamespace",
3216
- "named": false
3217
- },
3218
3179
  {
3219
3180
  "type": "usize",
3220
3181
  "named": false
Binary file
package/tree-sitter.json CHANGED
@@ -13,7 +13,7 @@
13
13
  }
14
14
  ],
15
15
  "metadata": {
16
- "version": "8.0.0",
16
+ "version": "9.0.0",
17
17
  "license": "MIT",
18
18
  "description": "Zig grammar for tree-sitter",
19
19
  "authors": [