summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorydah <[email protected]>2024-09-03 16:12:30 +0900
committerYuichiro Kaneko <[email protected]>2024-09-03 22:09:08 +0900
commita2243ee48bf6d68b0e5c713b5e7dd6bf3b57f62c (patch)
tree3adb090f6c1f3ad0ae7cd436fe09fadb9ff09b08 /ast.c
parentaf143d8a749ae0ba0f394521dd46bea824a354fa (diff)
Implement ALIAS NODE keyword locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11530
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index fd6a6dea89..d6d3e11d60 100644
--- a/ast.c
+++ b/ast.c
@@ -775,6 +775,10 @@ node_locations(VALUE ast_value, const NODE *node)
{
enum node_type type = nd_type(node);
switch (type) {
+ case NODE_ALIAS:
+ return rb_ary_new_from_args(2,
+ location_new(nd_code_loc(node)),
+ location_new(&RNODE_ALIAS(node)->keyword_loc));
case NODE_UNDEF:
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),