LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Natural representation for expressions. More...
#include <exp.hh>
Public Member Functions | |
Ex (const tree::rExp &exp) | |
virtual tree::rExp | un_ex () override |
Pretend THIS was an Ex: return the expression part. | |
virtual tree::rStm | un_nx () override |
Pretend THIS was an Nx: return the statement part. | |
virtual tree::rStm | un_cx (const temp::Label &t, const temp::Label &f) override |
Pretend THIS was a Cx: return the branching such that the resulting code jump to t if the conditional is satisfied, f otherwise. | |
virtual std::ostream & | dump (std::ostream &ostr) const override |
Private Attributes | |
tree::rExp | exp_ |
Natural representation for expressions.
|
inline |
|
overridevirtual |
Implements translate::Exp.
References exp_.
|
overridevirtual |
Pretend THIS was a Cx: return the branching such that the resulting code jump to t if the conditional is satisfied, f otherwise.
Implements translate::Exp.
References exp_, tree::Cjump::ne, and translate::Cx::un_cx().
|
overridevirtual |
Pretend THIS was an Ex: return the expression part.
Implements translate::Exp.
|
overridevirtual |
Pretend THIS was an Nx: return the statement part.
Implements translate::Exp.