@willbooster/tree-sitter-javascript 2.0.0 → 2.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/grammar.js +6 -3
- package/package.json +1 -1
- package/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter.json +1 -1
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],
|
|
@@ -503,7 +504,7 @@ module.exports = grammar({
|
|
|
503
504
|
|
|
504
505
|
labeled_statement: ($) =>
|
|
505
506
|
seq(
|
|
506
|
-
field('label', alias(choice($.identifier, $._reserved_identifier), $.statement_identifier)),
|
|
507
|
+
field('label', alias(choice($.identifier, $.undefined, $._reserved_identifier), $.statement_identifier)),
|
|
507
508
|
':',
|
|
508
509
|
field('body', $._single_statement)
|
|
509
510
|
),
|
|
@@ -1078,8 +1079,10 @@ module.exports = grammar({
|
|
|
1078
1079
|
seq(
|
|
1079
1080
|
'/',
|
|
1080
1081
|
field('pattern', $.regex_pattern),
|
|
1081
|
-
|
|
1082
|
-
|
|
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
|
Binary file
|