2024-02-04 12:23:59 -08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <gc/cord.h>
|
|
|
|
#include <gc.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "util.h"
|
2024-02-13 11:42:33 -08:00
|
|
|
#include "environment.h"
|
2024-02-04 12:23:59 -08:00
|
|
|
|
2024-02-17 23:22:31 -08:00
|
|
|
typedef struct {
|
2024-03-03 12:04:36 -08:00
|
|
|
const char *module_name;
|
2024-02-17 23:22:31 -08:00
|
|
|
CORD header, c_file;
|
|
|
|
} module_code_t;
|
|
|
|
|
2024-03-03 15:16:33 -08:00
|
|
|
CORD expr_as_texting(env_t *env, CORD expr, type_t *t, CORD color);
|
2024-02-17 23:22:31 -08:00
|
|
|
module_code_t compile_file(ast_t *ast);
|
2024-02-17 23:34:39 -08:00
|
|
|
CORD compile_type_ast(type_ast_t *t);
|
|
|
|
CORD compile_type(type_t *t);
|
2024-02-13 11:42:33 -08:00
|
|
|
CORD compile(env_t *env, ast_t *ast);
|
|
|
|
CORD compile_statement(env_t *env, ast_t *ast);
|
2024-02-17 16:32:30 -08:00
|
|
|
CORD compile_type_info(env_t *env, type_t *t);
|
2024-02-04 12:23:59 -08:00
|
|
|
|
|
|
|
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0
|