diff options
| author | Mel <mel@rnrd.eu> | 2025-12-28 23:54:51 +0100 |
|---|---|---|
| committer | Mel <mel@rnrd.eu> | 2025-12-28 23:54:51 +0100 |
| commit | 57878200dda049cf7d6f11c9ede6936d184649cb (patch) | |
| tree | 2fb5514036b763ba8400e2d98c6f12e20c8da24f /boot/visit.c | |
| parent | 0e08695d031ebb2e00a13582a75e1f27c2d6c73a (diff) | |
| download | catskill-57878200dda049cf7d6f11c9ede6936d184649cb.tar.zst catskill-57878200dda049cf7d6f11c9ede6936d184649cb.zip | |
Expand bootstrap common library with generic Array and more String utility functions
Signed-off-by: Mel <mel@rnrd.eu>
Diffstat (limited to 'boot/visit.c')
| -rw-r--r-- | boot/visit.c | 6 |
1 files changed, 4 insertions, 2 deletions
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 { |
