diff options
author | Bad Diode <bd@badd10de.dev> | 2022-04-08 18:49:40 -0300 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2022-04-08 18:49:40 -0300 |
commit | 233dd92768a54060df9096558aa58c1f598cce7d (patch) | |
tree | 70cad899ab9767e6cc069192a763e2c0354b9f3f /src/errors.c | |
parent | 55ecfb3b7713172f76ddbff022fa4d6a80d0661a (diff) | |
download | bdl-233dd92768a54060df9096558aa58c1f598cce7d.tar.gz bdl-233dd92768a54060df9096558aa58c1f598cce7d.zip |
Add rudimentary type checking
Diffstat (limited to 'src/errors.c')
-rw-r--r-- | src/errors.c | 5 |
1 files changed, 5 insertions, 0 deletions
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[] = { | |||
17 | [ERR_NOT_A_RPAREN] = "error: expected closing parentheses (rparen)", | 17 | [ERR_NOT_A_RPAREN] = "error: expected closing parentheses (rparen)", |
18 | [ERR_SYMBOL_REDEF] = "error: symbol redefinition", | 18 | [ERR_SYMBOL_REDEF] = "error: symbol redefinition", |
19 | [ERR_UNKNOWN_SYMBOL] = "error: unknown symbol", | 19 | [ERR_UNKNOWN_SYMBOL] = "error: unknown symbol", |
20 | [ERR_TYPE_REDEF] = "error: type redefinition", | ||
21 | [ERR_UNKNOWN_TYPE] = "error: unknown type", | ||
22 | [ERR_WRONG_RET_TYPE] = "error: return type don't match type signature", | ||
23 | [ERR_WRONG_COND_TYPE] = "error: conditional expression is not boolean", | ||
24 | [ERR_WRONG_TYPE_T_F] = "error: unmatched types between true and false expression", | ||
20 | }; | 25 | }; |
21 | 26 | ||
22 | static Error current_error = {.value = ERR_OK}; | 27 | static Error current_error = {.value = ERR_OK}; |