summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <t.yudai92@gmail.com>2024-11-28 23:45:41 +0900
committergit <svn-admin@ruby-lang.org>2024-12-02 18:33:57 +0000
commitc7e1cb0404c7fd522681f72265714537db700b9c (patch)
tree17e5752c8b7f22f7593aa9af0f8ac369049145fc
parent20206da7f751474ce20a20092937f806c7f7bc18 (diff)
[ruby/prism] Add document BlockParametersNode fields
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/75d1bde6cc
-rw-r--r--prism/config.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml
index 0480f47f77..b8a1bab2ae 100644
--- a/prism/config.yml
+++ b/prism/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.