#ifndef SK_COMPILER_H #define SK_COMPILER_H #include "commons.h" #include "prog.h" #include "sym.h" struct compiler { struct vec var_names; }; void compiler_init(struct compiler* self); void compiler_free(struct compiler* self); void compiler_compile(struct compiler* self, struct node* node, struct prog* prog, struct sym* sym); void compiler_compile_children(struct compiler* self, struct node* node, struct prog* prog, struct sym* sym); void compiler_compile_value(struct compiler* self, struct node* node, struct prog* prog, TypeKind type, union val val); void compiler_compile_and(struct compiler* self, struct node* node, struct prog* prog, struct sym* sym); void compiler_compile_or(struct compiler* self, struct node* node, struct prog* prog, struct sym* sym); void compiler_compile_if(struct compiler* self, struct node* node, struct prog* prog, struct sym* sym, struct vec* to_end); #endif