From b2bbf7a76afefd034d3aa1bdf24b97196bc7f9a2 Mon Sep 17 00:00:00 2001 From: Gl1tchs Date: Tue, 13 Jan 2026 16:52:02 +0100 Subject: Added union wrapper for type specific AST members. --- src/ast/ast.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/ast/ast.h b/src/ast/ast.h index 1e14369..cf082a7 100644 --- a/src/ast/ast.h +++ b/src/ast/ast.h @@ -54,10 +54,12 @@ typedef struct Type struct Type **args; // For GENERIC args. int arg_count; int is_const; - int array_size; // For fixed-size arrays [T; N]. - int is_varargs; // For function types (...). - int is_restrict; // For restrict pointers. - int has_drop; // For RAII: does this type implement Drop? + union { + int array_size; // For fixed-size arrays [T; N]. + int is_varargs; // For function types (...). + int is_restrict; // For restrict pointers. + int has_drop; // For RAII: does this type implement Drop? + }; } Type; // ** AST Node Types ** -- cgit v1.2.3