@willbooster/tree-sitter-zig 6.0.0 → 6.0.2

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
@@ -33,7 +33,7 @@ rejects it. It parses as the parser in upstream's 1.1.2 packages does, with thes
33
33
  An empty comment at EOF has no content child. Ordinary comments, including `////`, remain `comment` nodes.
34
34
  Queries that need every comment kind must match all three node types.
35
35
 
36
- - Error sets are accepted directly as container field types, and pointer and slice element types may be conditional.
36
+ - Error sets are accepted directly as container field types, and pointer, slice and array element types may be conditional.
37
37
  - `async` and `await` are ordinary identifiers. Assembly clobbers use an expression, including an anonymous struct
38
38
  initializer, as in Zig 0.16.
39
39
  - Zero-bit integers `u0` and `i0` are builtin types.
@@ -164,4 +164,4 @@ with libFuzzer and sanitizers (`.github/workflows/robustness.yml`).
164
164
 
165
165
  ### References
166
166
 
167
- - [Zig Grammar](https://github.com/ziglang/zig-spec/blob/master/grammar/grammar.peg)
167
+ - [Zig Grammar](https://ziglang.org/documentation/master/#Grammar)
package/grammar.js CHANGED
@@ -708,7 +708,7 @@ module.exports = grammar({
708
708
  $.expression,
709
709
  optional(seq(':', $.expression)),
710
710
  ']',
711
- $.type_expression,
711
+ choice($.type_expression, $.if_type_expression),
712
712
  )),
713
713
 
714
714
  error_union_type: $ => prec.right(2, seq(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-zig",
3
- "version": "6.0.0",
3
+ "version": "6.0.2",
4
4
  "description": "Zig grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -358,6 +358,10 @@
358
358
  {
359
359
  "type": "expression",
360
360
  "named": true
361
+ },
362
+ {
363
+ "type": "if_type_expression",
364
+ "named": true
361
365
  }
362
366
  ]
363
367
  }
Binary file
package/tree-sitter.json CHANGED
@@ -15,7 +15,7 @@
15
15
  }
16
16
  ],
17
17
  "metadata": {
18
- "version": "6.0.0",
18
+ "version": "6.0.2",
19
19
  "license": "MIT",
20
20
  "description": "Zig grammar for tree-sitter",
21
21
  "authors": [