summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authorydah <[email protected]>2024-09-27 02:01:08 +0900
committerYuichiro Kaneko <[email protected]>2024-09-27 18:20:00 +0900
commiteff16d93025d354de08cb40a11a51acffdf26e57 (patch)
tree6ee875111828084ef0276207f02f6d039014b54a /ast.c
parenta70adce1ce5fae8eaae385214ac0d2e7d17c1103 (diff)
Implement OP_ASGN1 NODE locations
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/11701
Diffstat (limited to 'ast.c')
-rw-r--r--ast.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/ast.c b/ast.c
index d2bc60c3e1..c32a22e7b5 100644
--- a/ast.c
+++ b/ast.c
@@ -815,6 +815,13 @@ node_locations(VALUE ast_value, const NODE *node)
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),
location_new(&RNODE_OR(node)->operator_loc));
+ case NODE_OP_ASGN1:
+ return rb_ary_new_from_args(5,
+ location_new(nd_code_loc(node)),
+ location_new(&RNODE_OP_ASGN1(node)->call_operator_loc),
+ location_new(&RNODE_OP_ASGN1(node)->opening_loc),
+ location_new(&RNODE_OP_ASGN1(node)->closing_loc),
+ location_new(&RNODE_OP_ASGN1(node)->binary_operator_loc));
case NODE_REDO:
return rb_ary_new_from_args(2,
location_new(nd_code_loc(node)),