summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <t.yudai92@gmail.com>2024-12-04 08:42:22 +0900
committergit <svn-admin@ruby-lang.org>2024-12-04 17:31:21 +0000
commit5898abd08406f9a432fe4ae9743005ebfcd71435 (patch)
treea126bd3f5856cfbf0e9595b6ac717bfd08484d56
parent8a228f297e036025656d5682cd14f7189fca8830 (diff)
[ruby/prism] Add document CapturePatternNode fields
Partially: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/1ffd693f9b
-rw-r--r--prism/config.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml
index 3805aeb3cc..10c9325245 100644
--- a/prism/config.yml
+++ b/prism/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.