From 57878200dda049cf7d6f11c9ede6936d184649cb Mon Sep 17 00:00:00 2001 From: Mel Date: Sun, 28 Dec 2025 23:54:51 +0100 Subject: Expand bootstrap common library with generic Array and more String utility functions Signed-off-by: Mel --- boot/visit.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'boot/visit.c') diff --git a/boot/visit.c b/boot/visit.c index fa49a7d..f9ad51c 100644 --- a/boot/visit.c +++ b/boot/visit.c @@ -1027,7 +1027,9 @@ printer_visit_bare_declaration_node(struct Visit* visit, struct Bare_Declaration TREE_PRINTER_PREAMBLE PRINT("(declaration "); - STRING_ARRAY_FOR_EACH (i, name, node->names) { PRINT("%s ", name.data); } + FOR_EACH_ARRAY(struct String, name, &node->names, { + PRINT("%s ", name.data); + }) if (node->type && node->type->type != TYPE_NODE_NONE) { VISIT(visit_type_node, node->type); @@ -1107,7 +1109,7 @@ printer_visit_argument_group_node(struct Visit* visit, struct Argument_Group_Nod uint i = 0; FOR_EACH (struct Expression*, argument, node->arguments) { - struct String name = string_array_at(&node->argument_names, i++); + struct String name = *array_at(struct String, &node->argument_names, i++); if (name.data && name.data[0] != '\0') { PRINT(" (named arg '%s' ", name.data); } else { -- cgit 1.4.1