diff options
author | ydah <[email protected]> | 2024-09-10 00:13:24 +0900 |
---|---|---|
committer | Yuichiro Kaneko <[email protected]> | 2024-09-11 09:28:55 +0900 |
commit | 4e6091ce09154d735cca025a4d0130eecebbbc19 (patch) | |
tree | cea93508f61b03a15b6f28b402ecaea980426aeb /ast.c | |
parent | 1adcc41b94d49899b1809fba119f74501fc992b1 (diff) |
Implement WHILE and UNTIL NODE locations
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/11579
Diffstat (limited to 'ast.c')
-rw-r--r-- | ast.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -806,6 +806,16 @@ node_locations(VALUE ast_value, const NODE *node) location_new(nd_code_loc(node)), location_new(&RNODE_WHEN(node)->keyword_loc), location_new(&RNODE_WHEN(node)->then_keyword_loc)); + case NODE_WHILE: + return rb_ary_new_from_args(3, + location_new(nd_code_loc(node)), + location_new(&RNODE_WHILE(node)->keyword_loc), + location_new(&RNODE_WHILE(node)->closing_loc)); + case NODE_UNTIL: + return rb_ary_new_from_args(3, + location_new(nd_code_loc(node)), + location_new(&RNODE_UNTIL(node)->keyword_loc), + location_new(&RNODE_UNTIL(node)->closing_loc)); case NODE_ARGS_AUX: case NODE_LAST: break; |