Brain  1.0.0
A fast esoteric language!
IncrementExpr Class Reference

Class that represent the increment operator in Brain. More...

#include <IncrementExpr.h>

Inheritance diagram for IncrementExpr:
Collaboration diagram for IncrementExpr:

Public Member Functions

 IncrementExpr (int increment)
 
void code_gen (llvm::Module *M, llvm::IRBuilder<> &B, llvm::BasicBlock *BreakBB)
 Generates the IR (Intermediate Representation) code to be executed by llvm. More...
 
void debug_description (int level)
 Prints debug information when Brain's compiler has the active flags: -v | -emit-ast. More...
 
void ast_code_gen ()
 Method for the reverse code generation from the AST. It prints out to the stdout the token itself.
 
bool update_expression (char update)
 Virtual method for updating the AST exprs. More...
 
- Public Member Functions inherited from Expr
virtual ExpressionType expression_category ()
 Returns the category of the expression given by the caller.
 

Protected Attributes

int _increment
 

Detailed Description

Class that represent the increment operator in Brain.

Member Function Documentation

void IncrementExpr::code_gen ( llvm::Module *  M,
llvm::IRBuilder<> &  B,
llvm::BasicBlock *  BreakBB 
)
virtual

Generates the IR (Intermediate Representation) code to be executed by llvm.

Parameters
MA pointer to the Brain's module.
BA reference to the Brain's IR builder.
BreakBBA pointer to the Brain's basic block.

Implements Expr.

void IncrementExpr::debug_description ( int  level)
virtual

Prints debug information when Brain's compiler has the active flags: -v | -emit-ast.

Parameters
levelThe width used to display the debug information (to mimic identation).

Implements Expr.

bool IncrementExpr::update_expression ( char  update)
virtual

Virtual method for updating the AST exprs.

Parameters
updateThe char whose expression will be updated.

Reimplemented from Expr.


The documentation for this class was generated from the following files: