summaryrefslogtreecommitdiff
path: root/node_dump.c
diff options
context:
space:
mode:
authorydah <[email protected]>2024-09-22 00:17:52 +0900
committerYuichiro Kaneko <[email protected]>2024-09-23 09:19:37 +0900
commit5334766bebcb471549b300c6e6e9cf0d08575116 (patch)
treec2d6a727c50f22bcff51dc7fa34953a3f19ca15d /node_dump.c
parentfeac2b4b77b337a637d80793c53b680e5697cab6 (diff)
Implement CASE2 NODE keyword locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11661
Diffstat (limited to 'node_dump.c')
-rw-r--r--node_dump.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/node_dump.c b/node_dump.c
index 3e92c87bf0..9a92762e10 100644
--- a/node_dump.c
+++ b/node_dump.c
@@ -271,8 +271,10 @@ dump_node(VALUE buf, VALUE indent, int comment, const NODE * node)
ANN("format: case; [nd_body]; end");
ANN("example: case; when 1; foo; when 2; bar; else baz; end");
F_NODE(nd_head, RNODE_CASE2, "case expr");
- LAST_NODE;
F_NODE(nd_body, RNODE_CASE2, "when clauses");
+ F_LOC(case_keyword_loc, RNODE_CASE2);
+ LAST_NODE;
+ F_LOC(end_keyword_loc, RNODE_CASE2);
return;
case NODE_CASE3:
ANN("case statement (pattern matching)");