From 75d1bde6cc7fa90cd90978e2b23a1533f7bce4ea Mon Sep 17 00:00:00 2001 From: ydah Date: Thu, 28 Nov 2024 23:45:41 +0900 Subject: [PATCH] Add document BlockParametersNode fields Partially fixes: https://github.com/ruby/prism/issues/2123 --- config.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/config.yml b/config.yml index 0f50f30b94..3833f4efde 100644 --- a/config.yml +++ b/config.yml @@ -1172,13 +1172,49 @@ nodes: - name: parameters type: node? kind: ParametersNode + comment: | + Represents the parameters of the block. + + -> (a, b = 1; local) { } + ^^^^^^^^ + + foo do |a, b = 1; local| + ^^^^^^^^ + end - name: locals type: node[] kind: BlockLocalVariableNode + comment: | + Represents the local variables of the block. + + -> (a, b = 1; local) { } + ^^^^^ + + foo do |a, b = 1; local| + ^^^^^ + end - name: opening_loc type: location? + comment: | + Represents the opening location of the block parameters. + + -> (a, b = 1; local) { } + ^ + + foo do |a, b = 1; local| + ^ + end - name: closing_loc type: location? + comment: | + Represents the closing location of the block parameters. + + -> (a, b = 1; local) { } + ^ + + foo do |a, b = 1; local| + ^ + end comment: | Represents a block's parameters declaration.