From b8f40988abe242c0166edcc673554a1735ab50ee Mon Sep 17 00:00:00 2001 From: ydah Date: Thu, 28 Nov 2024 22:50:57 +0900 Subject: [PATCH] Add document BeginNode fields Partially fixes: https://github.com/ruby/prism/issues/2123 --- config.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/config.yml b/config.yml index 0f50f30b94..d07366594e 100644 --- a/config.yml +++ b/config.yml @@ -1084,20 +1084,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.