summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <t.yudai92@gmail.com>2024-11-28 23:38:44 +0900
committergit <svn-admin@ruby-lang.org>2024-12-02 18:34:21 +0000
commit02fa822ebce7b197fcadbb4b2d66df7a1166fe8b (patch)
treeac031cb705308c2bfbab5a96d9582fc817e0af8f
parentc7e1cb0404c7fd522681f72265714537db700b9c (diff)
[ruby/prism] Add document BlockParameterNode fields
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/480897eccf
-rw-r--r--prism/config.yml17
1 files changed, 17 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml
index b8a1bab2ae..03c6fbb745 100644
--- a/prism/config.yml
+++ b/prism/config.yml
@@ -1157,10 +1157,27 @@ nodes:
fields:
- name: name
type: constant?
+ comment: |
+ The name of the block parameter.
+
+ def a(&b) # name `:b`
+ ^
+ end
- name: name_loc
type: location?
+ comment: |
+ Represents the location of the block parameter name.
+
+ def a(&b)
+ ^
- name: operator_loc
type: location
+ comment: |
+ Represents the location of the `&` operator.
+
+ def a(&b)
+ ^
+ end
comment: |
Represents a block parameter of a method, block, or lambda definition.