31 lines
532 B
C
31 lines
532 B
C
#ifndef RZ_COMPILER_H
|
|
#define RZ_COMPILER_H
|
|
|
|
#include "commons.h"
|
|
#include "err.h"
|
|
#include "mod.h"
|
|
#include "node.h"
|
|
#include "tysy.h"
|
|
#include "sym.h"
|
|
|
|
typedef struct {
|
|
mod_t* mod;
|
|
sym_t* sym;
|
|
tysy_t* tysy;
|
|
err_t* err;
|
|
|
|
int scope;
|
|
} compiler_t;
|
|
|
|
void compiler_init(compiler_t* compiler,
|
|
mod_t* mod,
|
|
sym_t* sym,
|
|
tysy_t* tysy,
|
|
err_t* err);
|
|
|
|
void compiler_free(compiler_t* compiler);
|
|
|
|
int compiler_run(compiler_t* compiler, node_t* node);
|
|
|
|
#endif
|