summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <t.yudai92@gmail.com>2024-12-04 08:59:25 +0900
committergit <svn-admin@ruby-lang.org>2024-12-04 17:22:17 +0000
commit8a228f297e036025656d5682cd14f7189fca8830 (patch)
treee7c52b498913ce5e1d951a5f70f3740b7b72fa29
parentf88ebb4ad760a8c30278e136c25e216db0d47d26 (diff)
[ruby/prism] Add document CaseMatchNode fields
Partially: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/a78da01ef6
-rw-r--r--prism/config.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml
index b2af5c9ebb..3805aeb3cc 100644
--- a/prism/config.yml
+++ b/prism/config.yml
@@ -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.