Skip to content

Commit 5898abd

Browse files
ydahmatzbot
authored andcommitted
[ruby/prism] Add document CapturePatternNode fields
Partially: ruby/prism#2123 ruby/prism@1ffd693f9b
1 parent 8a228f2 commit 5898abd

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

prism/config.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,11 +1698,26 @@ nodes:
16981698
- name: value
16991699
type: node
17001700
kind: pattern expression
1701+
comment: |
1702+
Represents the value to capture.
1703+
1704+
foo => bar
1705+
^^^
17011706
- name: target
17021707
type: node
17031708
kind: LocalVariableTargetNode
1709+
comment: |
1710+
Represents the target of the capture.
1711+
1712+
foo => bar
1713+
^^^
17041714
- name: operator_loc
17051715
type: location
1716+
comment: |
1717+
Represents the location of the `=>` operator.
1718+
1719+
foo => bar
1720+
^^
17061721
comment: |
17071722
Represents assigning to a local variable in pattern matching.
17081723

0 commit comments

Comments
 (0)