![]() |
Zen
A cross-platform functional programming language
|
Class that generates a closure initialization. More...
Public Member Functions | |
| ClosureInitWriter (Indenter &ind, z::stream &os, const Ast::ContinuationImplItem &continuation) | |
| Default constructor. | |
| void | write () |
| Writes the closures to the output stream. | |
Private Member Functions | |
| template<typename ClosureT > | |
| void | writeFunctionClosure (const ClosureT &closure) |
| Common code for different closures to the output stream. | |
| virtual void | visit (const Ast::RunClosure &closure) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::ExitClosure &closure) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::CallClosure &closure) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::FunctionCallClosure &closure) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::SharedClosure &closure) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::LoopClosure &closure) |
| Abstract visitor function. | |
| virtual void | visit (const Ast::ReturnClosure &closure) |
| Abstract visitor function. | |
Private Attributes | |
| Indenter & | _ind |
| Current indentation level. | |
| z::stream & | _os |
| Output stream. | |
| const Ast::ContinuationImplItem & | _continuation |
| The continuation whose closures are to be written. | |
| z::stringlist | _joinerList |
| Collector for list of joiners in current continuation. | |
Class that generates a closure initialization.
| ClosureInitWriter | ( | Indenter & | ind, |
| z::stream & | os, | ||
| const Ast::ContinuationImplItem & | continuation | ||
| ) | [inline] |
Default constructor.
| ind | The indentation level |
| os | The stream to write out to |
| continuation | The continuation whose closures are to be defined |
| virtual void visit | ( | const Ast::RunClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| virtual void visit | ( | const Ast::ReturnClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| virtual void visit | ( | const Ast::ExitClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| virtual void visit | ( | const Ast::SharedClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| virtual void visit | ( | const Ast::LoopClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| virtual void visit | ( | const Ast::CallClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| virtual void visit | ( | const Ast::FunctionCallClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
| closure | The closure reference to handle |
Implements Closure::Visitor.
| void writeFunctionClosure | ( | const ClosureT & | closure | ) | [inline, private] |
Common code for different closures to the output stream.
| closure | The closure to be written |