Skip to content

Commit

Permalink
Add document CaseNode fields
Browse files Browse the repository at this point in the history
Partially: #2123
  • Loading branch information
ydah committed Dec 4, 2024
1 parent ff50a14 commit 2f473b0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1735,16 +1735,41 @@ nodes:
- name: predicate
type: node?
kind: non-void expression
comment: |
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).
case true; when false; end
^^^^
- name: conditions
type: node[]
kind: WhenNode
comment: |
Represents the conditions of the case statement.
case true; when false; end
^^^^^^^^^^
- name: else_clause
type: node?
kind: ElseNode
comment: |
Represents the else clause of the case statement.
case true; when false; else; end
^^^^
- name: case_keyword_loc
type: location
comment: |
Represents the location of the `case` keyword.
case true; when false; end
^^^^
- name: end_keyword_loc
type: location
comment: |
Represents the location of the `end` keyword.
case true; when false; end
^^^
comment: |
Represents the use of a case statement.
Expand Down

0 comments on commit 2f473b0

Please sign in to comment.