From 202fe666d4b5b69131a09a3911cf8c3828b720d8 Mon Sep 17 00:00:00 2001 From: Mustafa Quraish Date: Thu, 3 Feb 2022 03:06:58 -0500 Subject: Allow implicitly converting between integer-like-types This design should also be useful for structs down the road. --- src/types.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/types.h') 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; -- cgit v1.2.3