Skip to content

Commit f88ebb4

Browse files
ydahmatzbot
authored andcommitted
[ruby/prism] Add document CaseNode fields
Partially: ruby/prism#2123 ruby/prism@2f473b0713
1 parent 932897a commit f88ebb4

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

prism/config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,16 +1735,41 @@ nodes:
17351735
- name: predicate
17361736
type: node?
17371737
kind: non-void expression
1738+
comment: |
1739+
Represents the predicate of the case statement. This can be either `nil` or any [non-void expressions](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression).
1740+
1741+
case true; when false; end
1742+
^^^^
17381743
- name: conditions
17391744
type: node[]
17401745
kind: WhenNode
1746+
comment: |
1747+
Represents the conditions of the case statement.
1748+
1749+
case true; when false; end
1750+
^^^^^^^^^^
17411751
- name: else_clause
17421752
type: node?
17431753
kind: ElseNode
1754+
comment: |
1755+
Represents the else clause of the case statement.
1756+
1757+
case true; when false; else; end
1758+
^^^^
17441759
- name: case_keyword_loc
17451760
type: location
1761+
comment: |
1762+
Represents the location of the `case` keyword.
1763+
1764+
case true; when false; end
1765+
^^^^
17461766
- name: end_keyword_loc
17471767
type: location
1768+
comment: |
1769+
Represents the location of the `end` keyword.
1770+
1771+
case true; when false; end
1772+
^^^
17481773
comment: |
17491774
Represents the use of a case statement.
17501775

0 commit comments

Comments
 (0)