aboutsummaryrefslogtreecommitdiff
path: root/src/parser/ast.c
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-08-31 17:55:16 +0200
committerhachem <im@hachem.wtf>2026-08-31 17:55:16 +0200
commitcbdb9073480c3e4d8a088b306c23406cf42e25c0 (patch)
tree39f3093654cc8f27ea701ed1338cac84d93f42eb /src/parser/ast.c
parent53aed3fadf1f7ad66dea9a8a0b46bf42eda921be (diff)
feat: hex/binary integer literals and constant-folding const expressions
Diffstat (limited to 'src/parser/ast.c')
-rw-r--r--src/parser/ast.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/parser/ast.c b/src/parser/ast.c
index f9f857d..704e9a4 100644
--- a/src/parser/ast.c
+++ b/src/parser/ast.c
@@ -78,6 +78,8 @@ struct Program create_program(void)
void free_program(struct Program* program)
{
+ for (size_t i = 0; i < program->const_count; i += 1)
+ free_expr(program->consts[i].value);
free(program->consts);
free(program->data_decls);