aboutsummaryrefslogtreecommitdiff
path: root/compile.h
blob: 1f385bb356d6b776f1cd0ef18207bbfbe1ea3bb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#pragma once

#include <gc/cord.h>
#include <gc.h>
#include <stdio.h>

#include "util.h"
#include "environment.h"

typedef struct {
    const char *module_name;
    CORD header, c_file;
} module_code_t;

CORD expr_as_texting(env_t *env, CORD expr, type_t *t, CORD color);
module_code_t compile_file(ast_t *ast);
CORD compile_type_ast(type_ast_t *t);
CORD compile_declaration(type_t *t, const char *name);
CORD compile_type(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_statement(env_t *env, ast_t *ast);
CORD compile_type_info(env_t *env, type_t *t);

// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0