From 233dd92768a54060df9096558aa58c1f598cce7d Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 8 Apr 2022 18:49:40 -0300 Subject: Add rudimentary type checking --- src/errors.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/errors.c') diff --git a/src/errors.c b/src/errors.c index 2781bf5..b987b34 100644 --- a/src/errors.c +++ b/src/errors.c @@ -17,6 +17,11 @@ static const char* error_msgs[] = { [ERR_NOT_A_RPAREN] = "error: expected closing parentheses (rparen)", [ERR_SYMBOL_REDEF] = "error: symbol redefinition", [ERR_UNKNOWN_SYMBOL] = "error: unknown symbol", + [ERR_TYPE_REDEF] = "error: type redefinition", + [ERR_UNKNOWN_TYPE] = "error: unknown type", + [ERR_WRONG_RET_TYPE] = "error: return type don't match type signature", + [ERR_WRONG_COND_TYPE] = "error: conditional expression is not boolean", + [ERR_WRONG_TYPE_T_F] = "error: unmatched types between true and false expression", }; static Error current_error = {.value = ERR_OK}; -- cgit v1.2.1