diff options
| author | Zuhaitz <zuhaitz.zechhub@gmail.com> | 2026-01-13 19:02:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 19:02:40 +0000 |
| commit | 64732fbbec8ea8001884ff31e719a086b7447f92 (patch) | |
| tree | 6c95055b19c34ecfad6e4056d9ff83b7fcff58f8 /src | |
| parent | 646798ce0d58c46835d61f4cb0e79e369759ce47 (diff) | |
| parent | b2bbf7a76afefd034d3aa1bdf24b97196bc7f9a2 (diff) | |
Merge pull request #39 from Gl1tchs/main
Added union wrapper for type specific AST members.
Diffstat (limited to 'src')
| -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 ** |
