Brain  1.0.0
A fast esoteric language!
Expr Class Referenceabstract

Abstract class in which all expressions in Brain implement from. More...

#include <Expr.h>

Inheritance diagram for Expr:

Public Member Functions

virtual void code_gen (llvm::Module *M, llvm::IRBuilder<> &B, llvm::BasicBlock *BreakBB)=0
 Virtual method for code generation. More...
 
virtual void debug_description (int level)=0
 Virtual method for the AST's emission. More...
 
virtual void ast_code_gen ()=0
 Virtual method for the reverse code generation from the AST. It prints out to the stdout the token itself.
 
virtual bool update_expression (char update)
 Virtual method for updating the AST exprs. More...
 
virtual ExpressionType expression_category ()
 Returns the category of the expression given by the caller.
 

Detailed Description

Abstract class in which all expressions in Brain implement from.

Member Function Documentation

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

Virtual method for code generation.

Parameters
MThe current Module.
BThe current IR Builder.
BreakBBThe outter Basic Block that continues after a loop.

Implemented in ArithmeticExpr, LoopExpr, IfExpr, FloatExpr, InputExpr, ShiftExpr, DebugExpr, IncrementExpr, OutputExpr, and BreakExpr.

virtual void Expr::debug_description ( int  level)
pure virtual

Virtual method for the AST's emission.

Parameters
levelDepth within the AST.

Implemented in ArithmeticExpr, LoopExpr, IfExpr, FloatExpr, InputExpr, ShiftExpr, DebugExpr, IncrementExpr, OutputExpr, and BreakExpr.

virtual bool Expr::update_expression ( char  update)
inlinevirtual

Virtual method for updating the AST exprs.

Parameters
updateThe char whose expression will be updated.

Reimplemented in ShiftExpr, and IncrementExpr.


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