add mulitple variable declaration, with null default. add call

This commit is contained in:
2025-06-05 04:04:41 +01:00
parent 7b76b0d888
commit 61d8bc61c3
14 changed files with 186 additions and 111 deletions

View File

@@ -7,6 +7,6 @@
ParsedValue *parse_identifier(Token *token) {
ParsedValue *parsedValue = checked_malloc(sizeof(ParsedValue));
parsedValue->type = AST_IDENTIFIER;
parsedValue->data = strcpy(checked_malloc(sizeof(token->value)), token->value);
parsedValue->data = strcpy(checked_malloc(strlen(token->value) + 1), token->value);
return parsedValue;
}