From 02fa822ebce7b197fcadbb4b2d66df7a1166fe8b Mon Sep 17 00:00:00 2001 From: ydah Date: Thu, 28 Nov 2024 23:38:44 +0900 Subject: [ruby/prism] Add document BlockParameterNode fields Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/480897eccf --- prism/config.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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. -- cgit v1.2.3