diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-06-06 16:28:53 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-06-06 16:28:53 -0400 |
| commit | 8c7d53008072dfda8b9d60be92fae1a8046fae5d (patch) | |
| tree | 769407e0461b3c989c27a740c423827a21adfa91 /compile.h | |
| parent | 31c8d0af1597b6b4996a90808b1b8c0983db309e (diff) | |
Split header compilation into a separate function
Diffstat (limited to 'compile.h')
| -rw-r--r-- | compile.h | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -9,19 +9,15 @@ #include "builtins/util.h" #include "environment.h" -typedef struct { - const char *module_name; - env_t *env; - CORD header, c_file; -} module_code_t; - CORD expr_as_text(env_t *env, CORD expr, type_t *t, CORD color); -module_code_t compile_file(ast_t *ast); +CORD compile_header(env_t *env, ast_t *ast); +CORD compile_file(env_t *env, ast_t *ast); CORD compile_type_ast(env_t *env, type_ast_t *t); CORD compile_declaration(env_t *env, type_t *t, const char *name); CORD compile_type(env_t *env, type_t *t); CORD compile(env_t *env, ast_t *ast); void compile_namespace(env_t *env, const char *ns_name, ast_t *block); +CORD compile_namespace_headers(env_t *env, const char *ns_name, ast_t *block); CORD compile_statement(env_t *env, ast_t *ast); CORD compile_type_info(env_t *env, type_t *t); CORD compile_cli_arg_call(env_t *env, CORD fn_name, type_t *fn_type); |
