From 3ed0922c634b5d358be2dff8a8c39f0a685bd6dc Mon Sep 17 00:00:00 2001 From: Lorenzo Torres Date: Fri, 5 Dec 2025 15:00:41 +0100 Subject: [PATCH] fixed top level union definition --- parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser.c b/parser.c index e3020d4..854c7af 100644 --- a/parser.c +++ b/parser.c @@ -1282,7 +1282,7 @@ static void parse(parser *p) ast_node *expr = parse_statement(p); while (expr) { if (expr->type != NODE_FUNCTION && expr->type != NODE_VAR_DECL && expr->type != NODE_IMPORT && - expr->type != NODE_STRUCT && expr->type != NODE_ENUM && expr->type != NODE_ENUM) { + expr->type != NODE_STRUCT && expr->type != NODE_UNION && expr->type != NODE_ENUM) { error(p, "expected function, struct, enum, union, global variable or import statement."); return; }