![]() |
Zen
A cross-platform functional programming language
|
Base class for AST Nodes representing closures. More...
#include <Ast.hpp>
Classes | |
| class | Visitor |
| QClosure Visitor interface class. More... | |
Public Types | |
| enum | Type { None, Link, Join } |
Enum to define how this closure is connected to the previous closure in the continuation. More... | |
| typedef z::list< const Closure * > | List |
| List of closures. | |
Public Member Functions | |
| void | setType (const Type &type) |
| Sets the closure type. | |
| bool | isJoin () const |
| Checks whether this closure is a joiner. | |
| const VariableRefList & | getXRefList () const |
| Returns the list of external references. | |
| virtual void | visit (Visitor &visitor) const =0 |
| Abstract visitor function. | |
Protected Member Functions | |
| Closure (const VariableRefList &xRefList) | |
| Default constructor. | |
Private Attributes | |
| Type | _type |
| The closure type. | |
| const VariableRefList | _xRefList |
| list of external variables that this closure refers to. | |
Base class for AST Nodes representing closures.
| enum Type |
| Closure | ( | const VariableRefList & | xRefList | ) | [inline, protected] |
Default constructor.
| xRefList | The list of external variables referenced by this closure. |
| const VariableRefList& getXRefList | ( | ) | const [inline] |
Returns the list of external references.
| bool isJoin | ( | ) | const [inline] |
Checks whether this closure is a joiner.
| void setType | ( | const Type & | type | ) | [inline] |
Sets the closure type.
| type | The closure type |
| virtual void visit | ( | Visitor & | visitor | ) | const [pure virtual] |
Abstract visitor function.
| visitor | The visitor object. |
Implemented in FunctionCallClosure, RunClosure, ExitClosure, CallClosure, LoopClosure, SharedClosure, and ReturnClosure.