add declaration with function support

This commit is contained in:
2025-06-04 23:12:03 +01:00
parent 2bd0384060
commit 7b76b0d888
10 changed files with 125 additions and 17 deletions

View File

@@ -34,9 +34,11 @@ ParsedValue *parse_call(char *file, DArray *tokens, size_t *index,
break;
ParsedValue *parsedValue = parse_token(file, tokens, index, true);
darray_push(arg, parsedValue);
free(parsedValue);
switch (token->type) {
case TOKEN_COMMA:
darray_push(args, arg);
free(arg);
arg = checked_malloc(sizeof(DArray));
darray_init(arg, sizeof(ParsedValue));
break;