LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ast::ForExp Class Reference

ForExp. More...

#include <for-exp.hh>

Inheritance diagram for ast::ForExp:
Collaboration diagram for ast::ForExp:

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 VarDecvardec_get () const
 Return implicit variable declaration.
VarDecvardec_get ()
 Return implicit variable declaration.
const Exphi_get () const
 Return high bound of the loop.
Exphi_get ()
 Return high bound of the loop.
const Expbody_get () const
 Return instructions executed in the loop.
Expbody_get ()
 Return instructions executed in the loop.
Accessors.
const Locationlocation_get () const
 Return scanner position information.
void location_set (const Location &)
 Set scanner position information.

Protected Attributes

VarDecvardec_
 Implicit variable declaration.
Exphi_
 High bound of the loop.
Expbody_
 Instructions executed in the loop.
Location location_
 Scanner position information.

Detailed Description

Constructor & Destructor Documentation

ast::ForExp::ForExp ( const Location location,
VarDec vardec,
Exp hi,
Exp body 
)

Construct a ForExp node.

ast::ForExp::~ForExp ( )
virtual

Destroy a ForExp node.

References body_, hi_, and vardec_.

Member Function Documentation

void ast::ForExp::accept ( ConstVisitor v) const
overridevirtual

Accept a const visitor v.

Implements ast::Exp.

void ast::ForExp::accept ( Visitor v)
overridevirtual

Accept a non-const visitor v.

Implements ast::Exp.

const Exp & ast::ForExp::body_get ( ) const
inline

Return instructions executed in the loop.

References body_.

Referenced by astclone::Cloner::operator()().

Exp & ast::ForExp::body_get ( )
inline

Return instructions executed in the loop.

References body_.

const Exp & ast::ForExp::hi_get ( ) const
inline

Return high bound of the loop.

References hi_.

Referenced by astclone::Cloner::operator()().

Exp & ast::ForExp::hi_get ( )
inline

Return high bound of the loop.

References hi_.

const Location & ast::Ast::location_get ( ) const
inlineinherited
void ast::Ast::location_set ( const Location location)
inlineinherited

Set scanner position information.

References ast::Ast::location_.

const VarDec & ast::ForExp::vardec_get ( ) const
inline

Return implicit variable declaration.

References vardec_.

Referenced by astclone::Cloner::operator()().

VarDec & ast::ForExp::vardec_get ( )
inline

Return implicit variable declaration.

References vardec_.

Member Data Documentation

Exp* ast::ForExp::body_
protected

Instructions executed in the loop.

Referenced by body_get(), and ~ForExp().

Exp* ast::ForExp::hi_
protected

High bound of the loop.

Referenced by hi_get(), and ~ForExp().

Location ast::Ast::location_
protectedinherited
VarDec* ast::ForExp::vardec_
protected

Implicit variable declaration.

Referenced by vardec_get(), and ~ForExp().


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