LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
#include <for-exp.hh>
Public Member Functions | |
Ctor & dtor. | |
ForExp (const Location &location, VarDec *vardec, Exp *hi, Exp *body) | |
Construct a ForExp node. | |
virtual | ~ForExp () |
Destroy a ForExp node. | |
Visitors entry point. | |
virtual void | accept (ConstVisitor &v) const override |
Accept a const visitor v. | |
virtual void | accept (Visitor &v) override |
Accept a non-const visitor v. | |
Accessors. | |
const VarDec & | vardec_get () const |
Return implicit variable declaration. | |
VarDec & | vardec_get () |
Return implicit variable declaration. | |
const Exp & | hi_get () const |
Return high bound of the loop. | |
Exp & | hi_get () |
Return high bound of the loop. | |
const Exp & | body_get () const |
Return instructions executed in the loop. | |
Exp & | body_get () |
Return instructions executed in the loop. | |
Accessors. | |
const Location & | location_get () const |
Return scanner position information. | |
void | location_set (const Location &) |
Set scanner position information. |
Protected Attributes | |
VarDec * | vardec_ |
Implicit variable declaration. | |
Exp * | hi_ |
High bound of the loop. | |
Exp * | body_ |
Instructions executed in the loop. | |
Location | location_ |
Scanner position information. |
Construct a ForExp node.
|
overridevirtual |
Accept a const visitor v.
Implements ast::Exp.
|
overridevirtual |
Accept a non-const visitor v.
Implements ast::Exp.
|
inline |
Return instructions executed in the loop.
References body_.
Referenced by astclone::Cloner::operator()().
|
inline |
|
inlineinherited |
Return scanner position information.
References ast::Ast::location_.
Referenced by type::TypeChecker::error(), object::DesugarVisitor::operator()(), astclone::Cloner::operator()(), ast::DecsList::push_back(), ast::DecsList::push_front(), and type::TypeChecker::type_mismatch().
|
inlineinherited |
Set scanner position information.
References ast::Ast::location_.
|
inline |
Return implicit variable declaration.
References vardec_.
Referenced by astclone::Cloner::operator()().
|
inline |
Return implicit variable declaration.
References vardec_.
|
protected |
Instructions executed in the loop.
Referenced by body_get(), and ~ForExp().
|
protectedinherited |
Scanner position information.
Referenced by ast::Ast::location_get(), ast::Ast::location_set(), ast::DecsList::push_back(), and ast::DecsList::push_front().
|
protected |
Implicit variable declaration.
Referenced by vardec_get(), and ~ForExp().