9 Star 40 Fork 8

sinriv / meshlang

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
compiler.h 1016 Bytes
一键复制 编辑 原始数据 按行查看 历史
cgoxopx 提交于 2019-11-12 20:57 . 修复bug
#ifndef MESHLANG_COMPILER
#define MESHLANG_COMPILER
#include "node.h"
#include <set>
#include <unordered_map>
namespace meshlang{
class compiler:public program{
public:
compiler();
void compile(const std::string & path);
private:
void compile_start();
void compile_flag_init();
std::map<std::string,node*> funcMap;
std::set<int> markMap,marked;
void compile_function(node * );
void compile_resetNode();
void compile_function_begin(node * );
void compile_function_end(node * );
void compile_add_goto(node * );
void compile_mark(node * );
void compile_addNode(node * );
void compile_declareNode(node * );
void compile_addExec(node * );
void compile_add_if(node * cond , node * t , node * f);
void compile_add_return();
void compile_add_ifFalseReturn(node * cond);
void compile_add_ifTrueReturn(node * cond);
FILE * fp;
};
}
#endif // COMPILER
C++
1
https://gitee.com/sinriv/meshlang.git
git@gitee.com:sinriv/meshlang.git
sinriv
meshlang
meshlang
master

搜索帮助