@willbooster/tree-sitter-javascript 2.0.1 → 2.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/grammar.js CHANGED
@@ -504,7 +504,7 @@ module.exports = grammar({
504
504
 
505
505
  labeled_statement: ($) =>
506
506
  seq(
507
- field('label', alias(choice($.identifier, $._reserved_identifier), $.statement_identifier)),
507
+ field('label', alias(choice($.identifier, $.undefined, $._reserved_identifier), $.statement_identifier)),
508
508
  ':',
509
509
  field('body', $._single_statement)
510
510
  ),
@@ -881,9 +881,14 @@ module.exports = grammar({
881
881
  'unary_void',
882
882
  seq(
883
883
  alias($._await_keyword, 'await'),
884
- optional($._await_identifier_line_break),
885
- optional(seq($._await_yield_identifier_start, optional($._await_yield_identifier_context))),
886
- optional($._line_break_after_await),
884
+ // Independent optional prefixes duplicate parser states; the yield start/context pair stays one alternative.
885
+ optional(
886
+ choice(
887
+ $._await_identifier_line_break,
888
+ seq($._await_yield_identifier_start, optional($._await_yield_identifier_context)),
889
+ $._line_break_after_await
890
+ )
891
+ ),
887
892
  $.expression,
888
893
  $._await_operand_end
889
894
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-javascript",
3
- "version": "2.0.1",
3
+ "version": "2.0.3",
4
4
  "description": "JavaScript grammar for tree-sitter",
5
5
  "keywords": [
6
6
  "incremental",
Binary file
package/tree-sitter.json CHANGED
@@ -24,7 +24,7 @@
24
24
  }
25
25
  ],
26
26
  "metadata": {
27
- "version": "2.0.1",
27
+ "version": "2.0.3",
28
28
  "license": "MIT",
29
29
  "description": "JavaScript grammar for tree-sitter",
30
30
  "authors": [