Zen
A cross-platform functional programming language

DoWhileStatement Class Reference

AST Node representing a do-while statement. More...

#include <Ast.hpp>

Inheritance diagram for DoWhileStatement:
Statement Node

List of all members.

Public Member Functions

 DoWhileStatement (const Ast::Expr &cond, const Ast::StatementList &list)
 Default constructor.
const Ast::ExprgetCond () const
 Returns a reference to the exit condition expression.
const Ast::StatementListgetList () const
 Returns a reference to the statement list in the while block.

Private Member Functions

virtual void visit (Statement::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const Ast::Expr_cond
 The exit condition to test.
const Ast::StatementList_list
 The statement list for the while loop.

Detailed Description

AST Node representing a do-while statement.

Todo:
Merge DoWhileStatement with WhileStatement

Constructor & Destructor Documentation

DoWhileStatement ( const Ast::Expr cond,
const Ast::StatementList list 
) [inline]

Default constructor.

Parameters:
condThe exit condition to test
listThe statement list for the while loop

Member Function Documentation

const Ast::Expr& getCond ( ) const [inline]

Returns a reference to the exit condition expression.

Returns:
The exit condition.
const Ast::StatementList& getList ( ) const [inline]

Returns a reference to the statement list in the while block.

Returns:
Statement list.
void visit ( Statement::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Statement.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines