summaryrefslogtreecommitdiff
path: root/ast.c
diff options
context:
space:
mode:
authoryui-knk <[email protected]>2024-07-22 16:28:00 +0900
committerYuichiro Kaneko <[email protected]>2024-07-23 14:35:23 +0900
commit57b11be15ae518288b719fb36068ceb23da6e050 ()
tree9a772e11ab2a75c86a3df1f83e67247751b1679e /ast.c
parentf23485a8d693cb69fd7b84c1ab93cb4198ecfe4a (diff)
Implement UNLESS NODE keyword locations
Notes: Merged: https://.com/ruby/ruby/pull/11227
-rw-r--r--ast.c14
1 files changed, 14 insertions, 0 deletions
@@ -747,12 +747,20 @@ ast_node_children(rb_execution_context_t *ec, VALUE self)
return node_children(data->ast_value, data->node);
}
static VALUE
location_new(rb_code_location_t *loc)
{
VALUE obj;
struct ASTLocationData *data;
obj = TypedData_Make_Struct(rb_cLocation, struct ASTLocationData, &rb_location_type, data);
data->first_lineno = loc->beg_pos.lineno;
data->first_column = loc->beg_pos.column;
@@ -767,6 +775,12 @@ node_locations(VALUE ast_value, const NODE *node)
{
enum node_type type = nd_type(node);
switch (type) {
case NODE_ARGS_AUX:
case NODE_LAST:
break;