@willbooster/tree-sitter-javascript 7.1.1 → 7.1.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 +20 -6
- package/package.json +1 -1
- package/tree-sitter-javascript.wasm +0 -0
- package/tree-sitter-javascript_script.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -124,6 +124,7 @@ module.exports = grammar({
|
|
|
124
124
|
sym('_yield_identifier'),
|
|
125
125
|
sym('_function_signature_start'),
|
|
126
126
|
sym('_async_function_signature_start'),
|
|
127
|
+
sym('_call_arguments_context'),
|
|
127
128
|
],
|
|
128
129
|
|
|
129
130
|
extras: ($) => [$.comment, sym('html_comment'), /[\s\p{Zs}\uFEFF\u2028\u2029\u2060\u200B]/u],
|
|
@@ -1393,7 +1394,8 @@ module.exports = grammar({
|
|
|
1393
1394
|
// Expression components
|
|
1394
1395
|
//
|
|
1395
1396
|
|
|
1396
|
-
arguments: ($) =>
|
|
1397
|
+
arguments: ($) =>
|
|
1398
|
+
seq(choice('(', sym('_call_arguments_context')), commaSep(optional(choice($.expression, $.spread_element))), ')'),
|
|
1397
1399
|
|
|
1398
1400
|
decorator: ($) =>
|
|
1399
1401
|
seq(
|
|
@@ -1506,11 +1508,23 @@ module.exports = grammar({
|
|
|
1506
1508
|
...(async ? ['async'] : []),
|
|
1507
1509
|
...(generator ? ['*'] : [optional(choice('get', 'set'))]),
|
|
1508
1510
|
field('name', $._property_name),
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1511
|
+
choice(
|
|
1512
|
+
functionScope(
|
|
1513
|
+
async,
|
|
1514
|
+
seq(
|
|
1515
|
+
field('parameters', $.formal_parameters),
|
|
1516
|
+
field('body', alias($._class_member_body, $.statement_block))
|
|
1517
|
+
),
|
|
1518
|
+
generator ? 'generator_function' : 'function_signature'
|
|
1519
|
+
),
|
|
1520
|
+
...(generator
|
|
1521
|
+
? []
|
|
1522
|
+
: [
|
|
1523
|
+
seq(
|
|
1524
|
+
field('parameters', $.formal_parameters),
|
|
1525
|
+
functionScope(async, field('body', alias($._class_member_body, $.statement_block)), 'function')
|
|
1526
|
+
),
|
|
1527
|
+
])
|
|
1514
1528
|
)
|
|
1515
1529
|
)
|
|
1516
1530
|
)
|
package/package.json
CHANGED
|
Binary file
|
|
Binary file
|