@willbooster/tree-sitter-javascript 2.0.0 → 2.0.1

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
@@ -106,6 +106,7 @@ module.exports = grammar({
106
106
  $._plain_resource_for_of_context,
107
107
  $._export_default,
108
108
  $._default_declaration_start,
109
+ $._regex_flags_start,
109
110
  ],
110
111
 
111
112
  extras: ($) => [$.comment, $.html_comment, /[\s\p{Zs}\uFEFF\u2028\u2029\u2060\u200B]/u],
@@ -1078,8 +1079,10 @@ module.exports = grammar({
1078
1079
  seq(
1079
1080
  '/',
1080
1081
  field('pattern', $.regex_pattern),
1081
- token.immediate(prec(1, '/')),
1082
- optional(field('flags', $.regex_flags))
1082
+ choice(
1083
+ seq($._regex_flags_start, token.immediate(prec(1, '/')), field('flags', $.regex_flags)),
1084
+ token.immediate(prec(1, '/'))
1085
+ )
1083
1086
  ),
1084
1087
 
1085
1088
  regex_pattern: () =>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@willbooster/tree-sitter-javascript",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
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.0",
27
+ "version": "2.0.1",
28
28
  "license": "MIT",
29
29
  "description": "JavaScript grammar for tree-sitter",
30
30
  "authors": [