diff options
| author | Mustafa Quraish <[email protected]> | 2022-02-03 03:06:58 -0500 |
|---|---|---|
| committer | Mustafa Quraish <[email protected]> | 2022-02-03 03:08:55 -0500 |
| commit | 202fe666d4b5b69131a09a3911cf8c3828b720d8 (patch) | |
| tree | 00d6e4165192b6f684e9f3dfad1fcdbd6cf13f80 /src/types.h | |
| parent | Move all common utilities to `std/common.cup` (diff) | |
| download | cup-202fe666d4b5b69131a09a3911cf8c3828b720d8.tar.xz cup-202fe666d4b5b69131a09a3911cf8c3828b720d8.zip | |
Allow implicitly converting between integer-like-types
This design should also be useful for structs down the road.
Diffstat (limited to 'src/types.h')
| -rw-r--r-- | src/types.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/types.h b/src/types.h index 7aadd8d..a1f6923 100644 --- a/src/types.h +++ b/src/types.h @@ -23,7 +23,9 @@ i64 size_for_type(Type *type); char *type_to_str(Type *type); bool type_equals(Type *a, Type *b); +bool is_int_type(Type *type); bool is_string_type(Type *type); +bool is_convertible(Type *from, Type *to); // Type checking / casting expressions to right types typedef struct ast_node Node; |