diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 18:38:29 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 18:38:29 -0500 |
| commit | 7355b2f7fe6f5dda2aee8feca025350146ccd0f5 (patch) | |
| tree | 8c0b7658e55a0fa634100ac4828fe4aaf6a0d27a /builtins/types.h | |
| parent | 1dcfbdc5c79c26b0f5d5997bed755e93f47e2ec1 (diff) | |
Change things up to use type params for all array and table methods
Diffstat (limited to 'builtins/types.h')
| -rw-r--r-- | builtins/types.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/builtins/types.h b/builtins/types.h index eac34dee..0430fbe5 100644 --- a/builtins/types.h +++ b/builtins/types.h @@ -15,7 +15,7 @@ typedef CORD (*str_fn_t)(const void*, bool, const struct TypeInfo*); typedef struct TypeInfo { int64_t size, align; struct { // Anonymous tagged union for convenience - enum { CustomInfo, PointerInfo, ArrayInfo, TableInfo, TypeInfoInfo, } tag; + enum { CustomInfo, PointerInfo, ArrayInfo, TableInfo, FunctionInfo, TypeInfoInfo, OpaqueInfo, } tag; union { struct { equal_fn_t equal; @@ -32,15 +32,19 @@ typedef struct TypeInfo { } ArrayInfo; struct { struct TypeInfo *key, *value; - int64_t entry_size, value_offset; } TableInfo; struct { const char *type_str; + } FunctionInfo; + struct { + const char *type_str; } TypeInfoInfo; + struct {} OpaqueInfo; }; }; } TypeInfo; CORD Type__as_str(const void *typeinfo, bool colorize, const TypeInfo *type); +CORD Func__as_str(const void *fn, bool colorize, const TypeInfo *type); // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
