roza/lib/compiler.h

31 lines
532 B
C
Raw Normal View History

2023-12-09 17:24:41 +00:00
#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"
2023-12-09 17:24:41 +00:00
typedef struct {
mod_t* mod;
sym_t* sym;
2023-12-09 17:24:41 +00:00
tysy_t* tysy;
err_t* err;
int scope;
2023-12-09 17:24:41 +00:00
} compiler_t;
void compiler_init(compiler_t* compiler,
mod_t* mod,
sym_t* sym,
tysy_t* tysy,
err_t* err);
2023-12-09 17:24:41 +00:00
void compiler_free(compiler_t* compiler);
int compiler_run(compiler_t* compiler, node_t* node);
2023-12-09 17:24:41 +00:00
#endif