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

WhileExp. More...

#include <while-exp.hh>

Inheritance diagram for ast::WhileExp:
Collaboration diagram for ast::WhileExp:

Public Member Functions

Ctor & dtor.
 WhileExp (const Location &location, Exp *test, Exp *body)
 Construct a WhileExp node.
virtual ~WhileExp ()
 Destroy a WhileExp 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 Exp & test_get () const
 Return exit condition of the loop.
Exp & test_get ()
 Return exit condition 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

Exp * test_
 Exit condition of the loop.
Exp * body_
 Instructions executed in the loop.
Location location_
 Scanner position information.

Detailed Description

Constructor & Destructor Documentation

ast::WhileExp::WhileExp ( const Location &  location,
Exp *  test,
Exp *  body 
)

Construct a WhileExp node.

ast::WhileExp::~WhileExp ( )
virtual

Destroy a WhileExp node.

References body_, and test_.

Member Function Documentation

void ast::WhileExp::accept ( ConstVisitor &  v) const
overridevirtual

Accept a const visitor v.

Implements ast::Exp.

void ast::WhileExp::accept ( Visitor &  v)
overridevirtual

Accept a non-const visitor v.

Implements ast::Exp.

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

Return instructions executed in the loop.

References body_.

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

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

Return instructions executed in the loop.

References body_.

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 Exp & ast::WhileExp::test_get ( ) const
inline

Return exit condition of the loop.

References test_.

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

Exp & ast::WhileExp::test_get ( )
inline

Return exit condition of the loop.

References test_.

Member Data Documentation

Exp* ast::WhileExp::body_
protected

Instructions executed in the loop.

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

Location ast::Ast::location_
protectedinherited
Exp* ast::WhileExp::test_
protected

Exit condition of the loop.

Referenced by test_get(), and ~WhileExp().


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