11 #include <llvm/IR/IRBuilder.h> 12 #include <llvm/IR/Module.h> 35 std::vector<Expr *> _exprs;
38 LoopExpr(std::vector<Expr *> exprs, LoopType type) : _exprs(exprs),
48 void code_gen(llvm::Module *M, llvm::IRBuilder<> &B,
49 llvm::BasicBlock *BreakBB);
Abstract class in which all expressions in Brain implement from.
Definition: Expr.h:62
Class that represents the loop operator in Brain.
Definition: LoopExpr.h:32
void code_gen(llvm::Module *M, llvm::IRBuilder<> &B, llvm::BasicBlock *BreakBB)
Generates the IR (Intermediate Representation) code to be executed by llvm.
Definition: LoopExpr.cpp:11
void debug_description(int level)
Prints debug information when Brain's compiler has the active flags: -v | -emit-ast.
Definition: LoopExpr.cpp:88
void ast_code_gen()
Method for the reverse code generation from the AST. It prints out to the stdout the token itself...
Definition: LoopExpr.cpp:119