Zen
A cross-platform functional programming language

LoopClosure Class Reference

AST Node representing a closure that causes the first closure in current continuation to execute again. More...

#include <Ast.hpp>

Inheritance diagram for LoopClosure:
Closure Node

List of all members.

Public Member Functions

 LoopClosure (const VariableRefList &xRefList, const Ast::Expr &expr)
 Default constructor.
const Ast::ExprgetExpr () const
 Returns the conditional expression for the loop closure.

Private Member Functions

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

Private Attributes

const Ast::Expr_expr
 The conditional expression.

Detailed Description

AST Node representing a closure that causes the first closure in current continuation to execute again.

The closure pointer in the continuation loops back to the beginning if the condition in this closure evaluates to true.


Constructor & Destructor Documentation

LoopClosure ( const VariableRefList xRefList,
const Ast::Expr expr 
) [inline]

Default constructor.

Parameters:
xRefListThe list of external variables referenced by this closure.
exprThe conditional expression.

Member Function Documentation

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

Returns the conditional expression for the loop closure.

Returns:
The conditional expression
void visit ( Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Closure.


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