Brain  1.0.0
A fast esoteric language!
FloatExpr.h
1 /* This is the source code of Brain Programming Language.
2  * It is licensed under GNU GPL v. 3 or later.
3  * You should have received a copy of the license in this archive (see LICENSE).
4  *
5  * Copyright Brain, 2016.
6  */
7 
8 #ifndef FLOAT_EXPR_H
9 #define FLOAT_EXPR_H
10 
11 #include <llvm/Transforms/Utils/BuildLibCalls.h>
12 #include <llvm/IR/IRBuilder.h>
13 #include <llvm/IR/Module.h>
14 
15 #include <iostream>
16 
17 #include "Expr.h"
18 #include "../general/ASTInfo.h"
19 
25 class FloatExpr : public Expr
26 {
27 public:
29  ~FloatExpr() {}
37  void code_gen(llvm::Module *M, llvm::IRBuilder<> &B,
38  llvm::BasicBlock *BreakBB);
45  void debug_description(int level);
50  void ast_code_gen();
51 };
52 
53 #endif // FLOAT_EXPR_H
static ASTInfo * instance()
Returns the instance of ASTInfo class if the member _instance is nullptr, otherwise it creates a new ...
Definition: ASTInfo.cpp:15
Abstract class in which all expressions in Brain implement from.
Definition: Expr.h:62
void code_gen(llvm::Module *M, llvm::IRBuilder<> &B, llvm::BasicBlock *BreakBB)
Generates the IR (Intermediate Representation) code to be executed by llvm.
Definition: FloatExpr.cpp:10
The FloatExpr class behaves just like the output expression, but it instead of print an integer numbe...
Definition: FloatExpr.h:25
void debug_description(int level)
Prints debug information when Brain&#39;s compiler has the active flags: -v | -emit-ast.
Definition: FloatExpr.cpp:41
bool is_using_io_lib
Controls if the io.ll module is included within the module which is being interpreted, if the module does not uses any function defined in io.c so it won&#39;t include io.ll in their .ll code.
Definition: ASTInfo.h:62
void ast_code_gen()
Method for the reverse code generation from the AST. It prints out to the stdout the token itself...
Definition: FloatExpr.cpp:36