diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 17:00:21 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 17:00:21 -0500 |
| commit | 5c49314ed4380f4e12a05888f635caa9af4a7cf4 (patch) | |
| tree | 955fa2d275bda280a3abdc3699d7a97814501f02 /typecheck.h | |
| parent | de3eeacfa0151243e4ef52af3d6c2e2b731fc720 (diff) | |
Add typechecking logic
Diffstat (limited to 'typecheck.h')
| -rw-r--r-- | typecheck.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/typecheck.h b/typecheck.h new file mode 100644 index 00000000..39d5b01c --- /dev/null +++ b/typecheck.h @@ -0,0 +1,19 @@ +#pragma once +#include <gc.h> +#include <stdarg.h> +#include <stdlib.h> +#include <string.h> + +#include "ast.h" +#include "types.h" + +type_t *parse_type_ast(env_t *env, type_ast_t *ast); +type_t *get_type(env_t *env, ast_t *ast); +void bind_statement(env_t *env, ast_t *statement); +type_t *get_math_type(env_t *env, ast_t *ast, type_t *lhs_t, type_t *rhs_t); +bool is_discardable(env_t *env, ast_t *ast); +type_t *get_namespace_type(env_t *env, ast_t *namespace_ast, type_t *type); +type_t *get_file_type(env_t *env, const char *path); +type_t *get_iter_type(env_t *env, ast_t *iter); + +// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 |
