@willbooster/tree-sitter-python 5.0.0 → 5.1.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/grammar.js CHANGED
@@ -572,7 +572,7 @@ module.exports = grammar({
572
572
  )
573
573
  ),
574
574
 
575
- _as_pattern: ($) => seq($.case_pattern, 'as', $.identifier),
575
+ _as_pattern: ($) => seq($.case_pattern, 'as', field('alias', $.identifier)),
576
576
 
577
577
  union_pattern: ($) => prec.right(seq($._simple_pattern, repeat1(prec.left(seq('|', $._simple_pattern))))),
578
578
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-python",
3
- "version": "5.0.0",
3
+ "version": "5.1.0",
4
4
  "description": "Python grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
@@ -270,17 +270,21 @@
270
270
  "fields": {
271
271
  "alias": {
272
272
  "multiple": false,
273
- "required": false,
273
+ "required": true,
274
274
  "types": [
275
275
  {
276
276
  "type": "as_pattern_target",
277
277
  "named": true
278
+ },
279
+ {
280
+ "type": "identifier",
281
+ "named": true
278
282
  }
279
283
  ]
280
284
  }
281
285
  },
282
286
  "children": {
283
- "multiple": true,
287
+ "multiple": false,
284
288
  "required": true,
285
289
  "types": [
286
290
  {
@@ -290,10 +294,6 @@
290
294
  {
291
295
  "type": "expression",
292
296
  "named": true
293
- },
294
- {
295
- "type": "identifier",
296
- "named": true
297
297
  }
298
298
  ]
299
299
  }
Binary file
package/tree-sitter.json CHANGED
@@ -19,7 +19,7 @@
19
19
  }
20
20
  ],
21
21
  "metadata": {
22
- "version": "5.0.0",
22
+ "version": "5.1.0",
23
23
  "license": "MIT",
24
24
  "description": "Python grammar for tree-sitter",
25
25
  "authors": [