@willbooster/tree-sitter-javascript 1.0.13 → 1.0.14
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 +7 -4
- package/package.json +1 -1
- package/src/node-types.json +5 -1
- package/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -81,6 +81,7 @@ module.exports = grammar({
|
|
|
81
81
|
$._line_break_after_binding,
|
|
82
82
|
$._line_break_after_field,
|
|
83
83
|
$._line_break_after_modifier,
|
|
84
|
+
$._line_break_before_attributes,
|
|
84
85
|
],
|
|
85
86
|
|
|
86
87
|
extras: ($) => [$.comment, $.html_comment, /[\s\p{Zs}\uFEFF\u2028\u2029\u2060\u200B]/u],
|
|
@@ -179,9 +180,11 @@ module.exports = grammar({
|
|
|
179
180
|
seq(
|
|
180
181
|
'export',
|
|
181
182
|
choice(
|
|
182
|
-
seq(
|
|
183
|
-
|
|
184
|
-
|
|
183
|
+
seq(
|
|
184
|
+
choice('*', $.namespace_export, $.export_clause),
|
|
185
|
+
$._from_clause,
|
|
186
|
+
optional(choice($.import_attribute, $._line_break_before_attributes))
|
|
187
|
+
),
|
|
185
188
|
alias($._local_export_clause, $.export_clause)
|
|
186
189
|
),
|
|
187
190
|
$._semicolon
|
|
@@ -240,7 +243,7 @@ module.exports = grammar({
|
|
|
240
243
|
seq(
|
|
241
244
|
'import',
|
|
242
245
|
choice(seq($.import_clause, $._from_clause), field('source', $.string)),
|
|
243
|
-
optional($.import_attribute),
|
|
246
|
+
optional(choice($.import_attribute, $._line_break_before_attributes)),
|
|
244
247
|
$._semicolon
|
|
245
248
|
),
|
|
246
249
|
|
package/package.json
CHANGED
package/src/node-types.json
CHANGED
|
@@ -1170,13 +1170,17 @@
|
|
|
1170
1170
|
}
|
|
1171
1171
|
},
|
|
1172
1172
|
"children": {
|
|
1173
|
-
"multiple":
|
|
1173
|
+
"multiple": true,
|
|
1174
1174
|
"required": false,
|
|
1175
1175
|
"types": [
|
|
1176
1176
|
{
|
|
1177
1177
|
"type": "export_clause",
|
|
1178
1178
|
"named": true
|
|
1179
1179
|
},
|
|
1180
|
+
{
|
|
1181
|
+
"type": "import_attribute",
|
|
1182
|
+
"named": true
|
|
1183
|
+
},
|
|
1180
1184
|
{
|
|
1181
1185
|
"type": "namespace_export",
|
|
1182
1186
|
"named": true
|
|
Binary file
|