summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorydah <t.yudai92@gmail.com>2024-11-28 22:50:57 +0900
committergit <svn-admin@ruby-lang.org>2024-12-02 18:37:05 +0000
commitb1f992e02745fed15e57e802073741623273c706 (patch)
tree6667694c6b327d053bedcefcf3930ca7efb4aa8b
parent76aa9fd1125f54dd60577fbc304f6eb93228fff5 (diff)
[ruby/prism] Add document BeginNode fields
Partially fixes: https://github.com/ruby/prism/issues/2123 https://github.com/ruby/prism/commit/b8f40988ab
-rw-r--r--prism/config.yml30
1 files changed, 30 insertions, 0 deletions
diff --git a/prism/config.yml b/prism/config.yml
index 2f24a24c0b..db06c77256 100644
--- a/prism/config.yml
+++ b/prism/config.yml
@@ -1119,20 +1119,50 @@ nodes:
fields:
- name: begin_keyword_loc
type: location?
+ comment: |
+ Represents the location of the `begin` keyword.
+
+ begin x end
+ ^^^^^
- name: statements
type: node?
kind: StatementsNode
+ comment: |
+ Represents the statements within the begin block.
+
+ begin x end
+ ^
- name: rescue_clause
type: node?
kind: RescueNode
+ comment: |
+ Represents the rescue clause within the begin block.
+
+ begin x; rescue y; end
+ ^^^^^^^^
- name: else_clause
type: node?
kind: ElseNode
+ comment: |
+ Represents the else clause within the begin block.
+
+ begin x; rescue y; else z; end
+ ^^^^^^
- name: ensure_clause
type: node?
kind: EnsureNode
+ comment: |
+ Represents the ensure clause within the begin block.
+
+ begin x; ensure y; end
+ ^^^^^^^^
- name: end_keyword_loc
type: location?
+ comment: |
+ Represents the location of the `end` keyword.
+
+ begin x end
+ ^^^
newline: false
comment: |
Represents a begin statement.