Zen
A cross-platform functional programming language

ForeachStatement Class Reference

AST Node representing a foreach statement. More...

#include <Ast.hpp>

Inheritance diagram for ForeachStatement:
Statement Node

List of all members.

Public Member Functions

 ForeachStatement (const Ast::InitVariableDef &init, const Ast::StatementList &list)
 Default constructor.
const Ast::InitVariableDefgetInit () const
 Returns a reference to the loop variable.
const Ast::StatementListgetList () const
 Returns a reference to the statement list in the foreach block.

Private Member Functions

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

Private Attributes

const Ast::InitVariableDef_init
 The variable defined for this for loop.
const Ast::StatementList_list
 The statement list for the for loop.

Detailed Description

AST Node representing a foreach statement.

Todo:
Merge ForeachStatement with ForStatement

Constructor & Destructor Documentation

ForeachStatement ( const Ast::InitVariableDef init,
const Ast::StatementList list 
) [inline]

Default constructor.

Parameters:
initThe variable defined for this for loop
listThe statement list for the for loop

Member Function Documentation

const Ast::InitVariableDef& getInit ( ) const [inline]

Returns a reference to the loop variable.

Returns:
The loop variable.
const Ast::StatementList& getList ( ) const [inline]

Returns a reference to the statement list in the foreach 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