From 480897eccf52d3c90ff099cec92a6ebca1d98043 Mon Sep 17 00:00:00 2001 From: ydah Date: Thu, 28 Nov 2024 23:38:44 +0900 Subject: [PATCH] Add document BlockParameterNode fields Partially fixes: https://github.com/ruby/prism/issues/2123 --- config.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config.yml b/config.yml index 0f50f30b94..e6a4e878c8 100644 --- a/config.yml +++ b/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.