diff options
| author | ydah <t.yudai92@gmail.com> | 2024-12-04 09:18:35 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-12-04 17:22:00 +0000 |
| commit | f88ebb4ad760a8c30278e136c25e216db0d47d26 (patch) | |
| tree | de7b05dac315a2f15a9e447c29bfc0c82af0b90c | |
| parent | 932897af0e784d19ff508d45f473dd4d78f7149e (diff) | |
[ruby/prism] Add document CaseNode fields
Partially: https://github.com/ruby/prism/issues/2123
https://github.com/ruby/prism/commit/2f473b0713
| -rw-r--r-- | prism/config.yml | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml index dec6958403..b2af5c9ebb 100644 --- a/prism/config.yml +++ b/prism/config.yml @@ -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. |
