From 5c49314ed4380f4e12a05888f635caa9af4a7cf4 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 17 Feb 2024 17:00:21 -0500 Subject: Add typechecking logic --- typecheck.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 typecheck.h (limited to 'typecheck.h') 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 +#include +#include +#include + +#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 -- cgit v1.2.3