summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuhaitz <zuhaitz.zechhub@gmail.com>2026-01-13 19:02:40 +0000
committerGitHub <noreply@github.com>2026-01-13 19:02:40 +0000
commit64732fbbec8ea8001884ff31e719a086b7447f92 (patch)
tree6c95055b19c34ecfad6e4056d9ff83b7fcff58f8
parent646798ce0d58c46835d61f4cb0e79e369759ce47 (diff)
parentb2bbf7a76afefd034d3aa1bdf24b97196bc7f9a2 (diff)
Merge pull request #39 from Gl1tchs/main
Added union wrapper for type specific AST members.
-rw-r--r--src/ast/ast.h10
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 **