From 6d8b0392bb0c0df82285eec1b0f692113e66eb1a Mon Sep 17 00:00:00 2001 From: hachem Date: Sat, 19 Sep 2026 15:47:03 +0200 Subject: feat: enable_if --- ast.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ast.c') diff --git a/ast.c b/ast.c index ed694f9..58cbaf5 100644 --- a/ast.c +++ b/ast.c @@ -79,6 +79,14 @@ struct Node* node_named(enum NodeKind kind, const struct Name* name, struct Node return node; } +struct Node* node_block(enum NodeKind kind, struct Node* first, struct Node* body) +{ + struct Node* node = node_new(kind); + node->first = first; + node->body = body; + return node; +} + struct Node* node_append(struct Node* list, struct Node* node) { struct Node* last = list; @@ -98,6 +106,7 @@ void node_free(struct Node* node) node_free(node->first); node_free(node->second); node_free(node->third); + node_free(node->body); node_free(node->next); free(node); } -- cgit v1.3