Skip to content

Commit

Permalink
Merge pull request #3285 from ydah/doc-case-match
Browse files Browse the repository at this point in the history
Add document CaseMatchNode fields
  • Loading branch information
tenderlove authored Dec 4, 2024
2 parents b893d36 + a78da01 commit ee69a87
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 @@ -1713,16 +1713,41 @@ nodes:
- name: predicate
type: node?
kind: non-void expression
comment: |
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).
case true; in false; end
^^^^
- name: conditions
type: node[]
kind: InNode
comment: |
Represents the conditions of the case match.
case true; in false; end
^^^^^^^^
- name: else_clause
type: node?
kind: ElseNode
comment: |
Represents the else clause of the case match.
case true; in false; else; end
^^^^
- name: case_keyword_loc
type: location
comment: |
Represents the location of the `case` keyword.
case true; in false; end
^^^^
- name: end_keyword_loc
type: location
comment: |
Represents the location of the `end` keyword.
case true; in false; end
^^^
comment: |
Represents the use of a case statement for pattern matching.
Expand Down

0 comments on commit ee69a87

Please sign in to comment.