Skip to content

Commit a78da01

Browse files
committed
Add document CaseMatchNode fields
Partially: ruby#2123
1 parent ff50a14 commit a78da01

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Diff for: config.yml

+25
Original file line numberDiff line numberDiff line change
@@ -1713,16 +1713,41 @@ nodes:
17131713
- name: predicate
17141714
type: node?
17151715
kind: non-void expression
1716+
comment: |
1717+
Represents the predicate of the case match. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
1718+
1719+
case true; in false; end
1720+
^^^^
17161721
- name: conditions
17171722
type: node[]
17181723
kind: InNode
1724+
comment: |
1725+
Represents the conditions of the case match.
1726+
1727+
case true; in false; end
1728+
^^^^^^^^
17191729
- name: else_clause
17201730
type: node?
17211731
kind: ElseNode
1732+
comment: |
1733+
Represents the else clause of the case match.
1734+
1735+
case true; in false; else; end
1736+
^^^^
17221737
- name: case_keyword_loc
17231738
type: location
1739+
comment: |
1740+
Represents the location of the `case` keyword.
1741+
1742+
case true; in false; end
1743+
^^^^
17241744
- name: end_keyword_loc
17251745
type: location
1746+
comment: |
1747+
Represents the location of the `end` keyword.
1748+
1749+
case true; in false; end
1750+
^^^
17261751
comment: |
17271752
Represents the use of a case statement for pattern matching.
17281753

0 commit comments

Comments
 (0)