summaryrefslogtreecommitdiff
path: root/ast.c
diff options
authorydah <[email protected]>2024-09-27 23:55:48 +0900
committerYudai Takada <[email protected]>2025-01-03 23:03:04 +0900
commitc22b0598b0dd197a49212e06cfc91e4a3f2e058c (patch)
tree995b0050ace7bea2cdad77398d293802c57bc3bb /ast.c
parent5cc4240dda72582456dc271ec580178d070197a9 (diff)
Implement SUPER NODE locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11712
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index 0e4c8be2e2..3544aa3b69 100644
--- a/ast.c
+++ b/ast.c
@@ -846,6 +846,12 @@ node_locations(VALUE ast_value, const NODE *node)
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),
location_new(&RNODE_SPLAT(node)->operator_loc));
+ case NODE_SUPER:
+ return rb_ary_new_from_args(4,
+ location_new(nd_code_loc(node)),
+ location_new(&RNODE_SUPER(node)->keyword_loc),
+ location_new(&RNODE_SUPER(node)->lparen_loc),
+ location_new(&RNODE_SUPER(node)->rparen_loc));
case NODE_UNDEF:
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),