aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ast.h
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-08-30 11:34:50 +0900
committernsfisis <nsfisis@gmail.com>2025-08-30 11:34:50 +0900
commit6488032643944c0ca09a1d33689ccd93ea37f7af (patch)
tree02978bf8dc3be65f215513bb3ab4f62113038e12 /src/ast.h
parent9109277a574a424ff666d27d61156786bc380505 (diff)
downloadducc-6488032643944c0ca09a1d33689ccd93ea37f7af.tar.gz
ducc-6488032643944c0ca09a1d33689ccd93ea37f7af.tar.zst
ducc-6488032643944c0ca09a1d33689ccd93ea37f7af.zip
refactor: define enum StorageClass
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ast.h b/src/ast.h
index 108d436..8e70260 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -3,6 +3,18 @@
#include "std.h"
+enum StorageClass {
+ StorageClass_unspecified,
+ StorageClass_auto,
+ StorageClass_constexpr,
+ StorageClass_extern,
+ StorageClass_register,
+ StorageClass_static,
+ StorageClass_thread_local,
+ StorageClass_typedef,
+};
+typedef enum StorageClass StorageClass;
+
enum TypeKind {
TypeKind_unknown,
@@ -32,11 +44,11 @@ typedef struct TypeRef TypeRef;
struct Type {
TypeKind kind;
+ StorageClass storage_class;
// Check `base` instead of `kind` to test if the type is an array or a pointer.
struct Type* base;
int array_size;
TypeRef ref;
- BOOL is_static;
};
typedef struct Type Type;