@willbooster/tree-sitter-ruby 3.0.0 → 3.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 +9 -1
- package/package.json +1 -1
- package/src/node-types.json +12 -1
- package/tree-sitter-ruby.wasm +0 -0
- package/tree-sitter.json +1 -1
package/grammar.js
CHANGED
|
@@ -1652,11 +1652,19 @@ module.exports = grammar({
|
|
|
1652
1652
|
'->',
|
|
1653
1653
|
field(
|
|
1654
1654
|
'parameters',
|
|
1655
|
-
optional(
|
|
1655
|
+
optional(
|
|
1656
|
+
choice(
|
|
1657
|
+
alias($._parenthesized_lambda_parameters, $.lambda_parameters),
|
|
1658
|
+
alias($.bare_parameters, $.lambda_parameters)
|
|
1659
|
+
)
|
|
1660
|
+
)
|
|
1656
1661
|
),
|
|
1657
1662
|
field('body', choice($.block, $.do_block))
|
|
1658
1663
|
),
|
|
1659
1664
|
|
|
1665
|
+
_parenthesized_lambda_parameters: ($) =>
|
|
1666
|
+
seq('(', commaSep($._formal_parameter), optional(seq(';', sep1(field('locals', $.identifier), ','))), ')'),
|
|
1667
|
+
|
|
1660
1668
|
empty_statement: () => prec(-1, ';'),
|
|
1661
1669
|
|
|
1662
1670
|
_terminator: ($) => choice(prec.dynamic(1, $._line_break), ';'),
|
package/package.json
CHANGED
package/src/node-types.json
CHANGED
|
@@ -2346,7 +2346,18 @@
|
|
|
2346
2346
|
{
|
|
2347
2347
|
"type": "lambda_parameters",
|
|
2348
2348
|
"named": true,
|
|
2349
|
-
"fields": {
|
|
2349
|
+
"fields": {
|
|
2350
|
+
"locals": {
|
|
2351
|
+
"multiple": true,
|
|
2352
|
+
"required": false,
|
|
2353
|
+
"types": [
|
|
2354
|
+
{
|
|
2355
|
+
"type": "identifier",
|
|
2356
|
+
"named": true
|
|
2357
|
+
}
|
|
2358
|
+
]
|
|
2359
|
+
}
|
|
2360
|
+
},
|
|
2350
2361
|
"children": {
|
|
2351
2362
|
"multiple": true,
|
|
2352
2363
|
"required": false,
|
package/tree-sitter-ruby.wasm
CHANGED
|
Binary file
|