summaryrefslogtreecommitdiff
path: root/parse.y
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2026-03-03 21:25:06 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2026-03-03 23:05:00 +0900
commit7a3940e8b60a3f0b62db05210947ab841a029ca3 (patch)
tree7bde563d2c9d31e1172d6042ee7d124f0c13697d /parse.y
parentc128106e60f1a65243b3782a0f14a7a644b7ba6f (diff)
Unify rb_node_list_new and rb_node_list_new2
The former is the specialized case of the latter.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y8
1 files changed, 1 insertions, 7 deletions
diff --git a/parse.y b/parse.y
index ab301d6034..6813b39633 100644
--- a/parse.y
+++ b/parse.y
@@ -11708,16 +11708,10 @@ rb_node_match3_new(struct parser_params *p, NODE *nd_recv, NODE *nd_value, const
return n;
}
-/* TODO: Use union for NODE_LIST2 */
static rb_node_list_t *
rb_node_list_new(struct parser_params *p, NODE *nd_head, const YYLTYPE *loc)
{
- rb_node_list_t *n = NODE_NEWNODE(NODE_LIST, rb_node_list_t, loc);
- n->nd_head = nd_head;
- n->as.nd_alen = 1;
- n->nd_next = 0;
-
- return n;
+ return rb_node_list_new2(p, nd_head, 1, 0, loc);
}
static rb_node_list_t *