fix/refactor: Modified evaluate and changed it to evaluate_tree

So i did what the last commit said, also fixed parse_expr because it was
still using malloc for allocating new nodes so i made it use arena_alloc
like it should, did the very first tests so it's all good, i think is
readdy to merge.
This commit is contained in:
2026-04-13 08:44:30 -06:00
parent e4ec102cb9
commit 7ad4eba123
7 changed files with 52 additions and 36 deletions

View File

@@ -17,8 +17,7 @@ static void test_basic_evaluation(void** state) {
tokenize(expr, &context);
ParseResult result = parse(&context);
AST tree = result.tree;
uint64_t value = evaluate(tree.head);
int64_t value = evaluate(result);
assert_int_equal(value, 82);
}