diff --git a/README b/README index a559c2a21699465471384fb46237f11827283275..bc556dcd1b707e31dc3919d09df958b3fbf9f86f 100644 --- a/README +++ b/README @@ -1,7 +1,22 @@ AloLang Compiler Readme +AloLang语言编译器自述文档 + Distributed under the Lesser General Public License V3 +以LGPLv3许可证发布 + +Project Description: + +Compiler for the novel programming language AloLang. For description of AloLang, +visit https://doc.alolang.org.cn/ + +项目简介 + +新型程序语言AloLang的编译器。获取AloLang介绍,请访问https://doc.alolang.org.cn/ + +Compile Instructions: + To compile, we suggest that you have the project made in a dedicated directory. Use the following commands. diff --git a/src/Makefile.am b/src/Makefile.am index dc1f9b8d55a62995e0a7302f447341bff2f708a5..4193a27ecca7d6eca141b1de8675ad953a041359 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -3,7 +3,7 @@ bin_PROGRAMS = aloc aloc_SOURCES = aloc.cpp CompileUnit.cpp preprocessor.cpp Token.cpp utils.cpp\ ast/AssignmentAST.cpp ast/BaseAST.cpp ast/BinaryExprAST.cpp ast/BoolExprAST.cpp ast/CallExprAST.cpp ast/CodeBlockAST.cpp\ ast/ExprAST.cpp ast/ExternAST.cpp ast/FunctionAST.cpp ast/IntExprAST.cpp ast/IfExprAST.cpp ast/PrototypeAST.cpp\ - ast/TypeAST.cpp ast/VariableExprAST.cpp yacc_stuff/tokenizer.lpp + ast/TypeAST.cpp ast/VariableExprAST.cpp ast/WhileExprAST.cpp yacc_stuff/tokenizer.lpp AM_LFLAGS = -o lex.yy.c diff --git a/src/ast/WhileExprAST.cpp b/src/ast/WhileExprAST.cpp new file mode 100644 index 0000000000000000000000000000000000000000..bad61c28ce2bedd3ad6872ae96cbb3b42094a0cc --- /dev/null +++ b/src/ast/WhileExprAST.cpp @@ -0,0 +1,23 @@ +/* + * WhileExprAST.cpp + * + * Created on: Feb 20, 2021 + * Author: zbc + */ + +#include "WhileExprAST.h" + +WhileExprAST::WhileExprAST(CompileUnit *unit, CodeBlockAST *codeblock) + : ExprAST(unit) +{ +} + +WhileExprAST::~WhileExprAST() +{ + // TODO Auto-generated destructor stub +} + +llvm::Value *WhileExprAST::Codegen(llvm::IRBuilder<> *builder) +{ + return nullptr; +} diff --git a/src/ast/WhileExprAST.h b/src/ast/WhileExprAST.h new file mode 100644 index 0000000000000000000000000000000000000000..a6a4e2afccff45ab788f32ee2e17ab0ccbf1257e --- /dev/null +++ b/src/ast/WhileExprAST.h @@ -0,0 +1,21 @@ +/* + * WhileExprAST.h + * + * Created on: Feb 20, 2021 + * Author: zbc + */ + +#ifndef SRC_AST_WHILEEXPRAST_H_ +#define SRC_AST_WHILEEXPRAST_H_ + +#include "ExprAST.h" + +class WhileExprAST : public ExprAST +{ + public: + WhileExprAST(CompileUnit *unit, CodeBlockAST *codeblock); + virtual ~WhileExprAST(); + llvm::Value *Codegen(llvm::IRBuilder<> *builder); +}; + +#endif /* SRC_AST_WHILEEXPRAST_H_ */