aboutsummaryrefslogtreecommitdiff
path: root/types.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-02-14 13:43:23 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-02-14 13:43:23 -0500
commit9901f09ca4e52ed389710429c8eb8509d90cced7 (patch)
tree85f663595b844de7cf8bae7954981bf5874cfad1 /types.h
parent89ccb4f928c05c5cddfa71d1f51a175a43309ab3 (diff)
Syntax tweaks and cleanup
Diffstat (limited to 'types.h')
-rw-r--r--types.h14
1 files changed, 2 insertions, 12 deletions
diff --git a/types.h b/types.h
index b744d6b2..f71f8883 100644
--- a/types.h
+++ b/types.h
@@ -43,7 +43,6 @@ struct type_s {
PointerType,
StructType,
EnumType,
- VariantType,
TypeInfoType,
PlaceholderType,
} tag;
@@ -72,16 +71,13 @@ struct type_s {
bool is_optional:1, is_stack:1, is_readonly:1;
} PointerType;
struct {
+ const char *name;
arg_t *fields;
} StructType;
struct {
+ const char *name;
tag_t *tags;
} EnumType;
- struct {
- const char *name, *filename;
- type_t *variant_of;
- type_t *namespace_type;
- } VariantType;
struct {} TypeInfoType;
struct {
const char *filename, *name;
@@ -102,9 +98,6 @@ bool type_eq(type_t *a, type_t *b);
bool type_is_a(type_t *t, type_t *req);
type_t *type_or_type(type_t *a, type_t *b);
type_t *value_type(type_t *a);
-bool is_integral(type_t *t);
-bool is_floating_point(type_t *t);
-bool is_numeric(type_t *t);
typedef enum {NUM_PRECISION_EQUAL, NUM_PRECISION_LESS, NUM_PRECISION_MORE, NUM_PRECISION_INCOMPARABLE} precision_cmp_e;
precision_cmp_e compare_precision(type_t *a, type_t *b);
bool is_orderable(type_t *t);
@@ -114,9 +107,6 @@ bool can_promote(type_t *actual, type_t *needed);
bool can_leave_uninitialized(type_t *t);
bool can_have_cycles(type_t *t);
type_t *table_entry_type(type_t *table_t);
-type_t *base_variant(type_t *t);
-bool is_variant_of(type_t *t, type_t *base);
-type_t *base_value_type(type_t *t);
type_t *replace_type(type_t *t, type_t *target, type_t *replacement);
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0