roza/lib/compiler.h

31 lines
635 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 {
sym_t* sym;
tysy_t* tysy;
err_t* err;
int scope;
} compiler_t;
void compiler_init(compiler_t* compiler,
sym_t* sym,
tysy_t* tysy,
err_t* err);
void compiler_free(compiler_t* compiler);
int compiler_run(compiler_t* compiler, node_t* node, program_t* program);
void compiler_run_if(compiler_t* compiler, node_t* node, program_t* program,
int* end_points, size_t* sz);
#endif