diff options
| author | nsfisis <nsfisis@gmail.com> | 2025-09-14 01:18:16 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2025-09-14 01:20:01 +0900 |
| commit | 6a45ad108293f9fa4f90eed55fc1101711bcc0ee (patch) | |
| tree | bf3c39cb721bb86085e9555224651dd2c72ef069 /src/ast.c | |
| parent | 90246b99595e86e5e6fe41973db1a00171cf0462 (diff) | |
| download | ducc-6a45ad108293f9fa4f90eed55fc1101711bcc0ee.tar.gz ducc-6a45ad108293f9fa4f90eed55fc1101711bcc0ee.tar.zst ducc-6a45ad108293f9fa4f90eed55fc1101711bcc0ee.zip | |
fix: work-around for issue where storage class is changed somewhere
Diffstat (limited to 'src/ast.c')
| -rw-r--r-- | src/ast.c | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -4,6 +4,27 @@ #include "common.h" #include "preprocess.h" +const char* storageclass_stringify(StorageClass s) { + if (s == StorageClass_unspecified) + return ""; + if (s == StorageClass_auto) + return "auto"; + if (s == StorageClass_constexpr) + return "constexpr"; + if (s == StorageClass_extern) + return "extern"; + if (s == StorageClass_register) + return "register"; + if (s == StorageClass_static) + return "static"; + if (s == StorageClass_thread_local) + return "thread_local"; + if (s == StorageClass_typedef) + return "typedef"; + else + unreachable(); +} + const char* type_kind_stringify(TypeKind k) { if (k == TypeKind_unknown) return "<unknown>"; |
