diff options
Diffstat (limited to 'boot/parse.c')
| -rw-r--r-- | boot/parse.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/boot/parse.c b/boot/parse.c index 481fa90..ea6b06b 100644 --- a/boot/parse.c +++ b/boot/parse.c @@ -499,7 +499,7 @@ parser_function_header_node(struct Parser* p, struct Parser_Error* error) struct Argument_Group_Node parser_argument_group_node(struct Parser* p, struct Parser_Error* error) { - struct String_Array argument_names = string_array_new(); + Array(struct String) argument_names = array_new(struct String, 32); struct Expression *arguments_head = nil, *arguments_current = nil; for (;;) { // check if we have a named argument. @@ -521,7 +521,7 @@ parser_argument_group_node(struct Parser* p, struct Parser_Error* error) // if we have a named argument, we need to add it to the names array, // otherwise we just add an empty string. - string_array_add(&argument_names, name); + array_push(&argument_names, &name); if (parser_probe(p, TOKEN_COMMA)) { parser_next(p); @@ -538,7 +538,7 @@ parser_argument_group_node(struct Parser* p, struct Parser_Error* error) struct Bare_Declaration_Node parser_bare_declaration_node(struct Parser* p, struct Parser_Error* error) { - struct String_Array names = string_array_new(); + Array(struct String) names = array_new(struct String, 16); struct Span span = { 0 }; struct Cursor location = parser_peek(p).location; @@ -547,7 +547,7 @@ parser_bare_declaration_node(struct Parser* p, struct Parser_Error* error) CHECK_RETURN(parser_need(p, TOKEN_NAME, error), struct Bare_Declaration_Node); span = span_is_empty(span) ? name_token.span : span_merge(span, name_token.span); - string_array_add(&names, name_token.value.name); + array_push(&names, &name_token.value.name); struct Token next = parser_peek(p); if (token_can_begin_type(&next)) break; |
