diff options
| author | Gl1tchs <berkeumtbiricik@gmail.com> | 2026-01-13 16:52:02 +0100 |
|---|---|---|
| committer | Gl1tchs <berkeumtbiricik@gmail.com> | 2026-01-13 16:54:36 +0100 |
| commit | b2bbf7a76afefd034d3aa1bdf24b97196bc7f9a2 (patch) | |
| tree | a656f6c60bbfb9b262c49a5a1d267c90792cdcc5 | |
| parent | 4bbfca05a25305e330dc27b20db1d8aaf961b7d8 (diff) | |
Added union wrapper for type specific AST members.
| -rw-r--r-- | src/ast/ast.h | 10 |
1 files changed, 6 insertions, 4 deletions
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 ** |
