add list support to parser

This commit is contained in:
2025-06-11 02:08:17 +01:00
parent 55c1500453
commit a47df1ddb0
7 changed files with 85 additions and 11 deletions

View File

@@ -8,9 +8,7 @@
ParsedValue *convert_to_operation(DArray * to_operate_on, DArray * operations) {
if (to_operate_on->size == 1) {
ParsedValue * parsedValue = malloc(sizeof(ParsedValue));
memcpy(parsedValue, darray_get(to_operate_on, 0), sizeof(ParsedValue));
return parsedValue;
return darray_get(to_operate_on, 0);
}
TokenType operation = 0;
DArray positions;