From 1ffd693f9b82b0f6d1151515fde84df75d4a3aad Mon Sep 17 00:00:00 2001 From: ydah Date: Wed, 4 Dec 2024 08:42:22 +0900 Subject: [PATCH] Add document CapturePatternNode fields Partially: https://github.com/ruby/prism/issues/2123 --- config.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config.yml b/config.yml index ac8c83f688..5654273c05 100644 --- a/config.yml +++ b/config.yml @@ -1698,11 +1698,26 @@ nodes: - name: value type: node kind: pattern expression + comment: | + Represents the value to capture. + + foo => bar + ^^^ - name: target type: node kind: LocalVariableTargetNode + comment: | + Represents the target of the capture. + + foo => bar + ^^^ - name: operator_loc type: location + comment: | + Represents the location of the `=>` operator. + + foo => bar + ^^ comment: | Represents assigning to a local variable in pattern matching.