diff options
| author | Carson Fleming <cflems@cflems.net> | 2026-08-06 00:24:49 -0400 |
|---|---|---|
| committer | Carson Fleming <cflems@cflems.net> | 2026-08-06 00:24:49 -0400 |
| commit | b48e27f5cc31af65d8bb92d4b81cd03a60c5bcdb (patch) | |
| tree | 0901fba9ff451968d758ed47b57ff99d1330fb8a /type.h | |
| parent | a207a7f39514f03ddfafbe39e52a3fae57a414b4 (diff) | |
| download | ccc-b48e27f5cc31af65d8bb92d4b81cd03a60c5bcdb.tar.gz | |
clean up yesterday's hacks + functions in type system
Diffstat (limited to 'type.h')
| -rw-r--r-- | type.h | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -9,10 +9,16 @@ struct data_type { bool is_floating; }; +struct fn_type { + struct type_list* arg_types; + struct type* return_type; +}; + struct type { enum { TP_DATA, TP_PTR, + TP_FN, } type; union { struct { @@ -23,9 +29,15 @@ struct type { const struct data_type* data_type; integral_t ptr_level; } pointer; + struct fn_type fn; }; }; +struct type_list { + const struct type* type; + struct type_list* next; +}; + extern const struct data_type void_type; extern const struct data_type char_type; extern const struct data_type short_type; |
