Zen
A cross-platform functional programming language
|
Class that generates statements. More...
Public Member Functions | |
StatementGenerator (Indenter &ind, z::stream &os, const Ast::Statement &stmt) | |
Default constructor. | |
z::stream & | write () |
Visit current statement. | |
Private Member Functions | |
void | writeStatementList (const Ast::StatementList &list) |
Writes the statement list to the output stream. | |
virtual void | visit (const Ast::StatementBlock &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::ExprStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::DefineVarStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::LogStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::IfThenStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::IfElseStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::SwitchStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::SelectStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::ForeachStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::ForStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::WhileStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::DoWhileStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::BreakStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::ContinueStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::EmptyStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::TypeSpecStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::RoutineReturnStatement &stmt) |
Abstract visitor function. | |
virtual void | visit (const Ast::FunctionReturnStatement &stmt) |
Abstract visitor function. | |
Private Attributes | |
Indenter & | _ind |
Current indentation level. | |
z::stream & | _os |
Output stream. | |
const Ast::Statement & | _stmt |
Current statement. |
Class that generates statements.
StatementGenerator | ( | Indenter & | ind, |
z::stream & | os, | ||
const Ast::Statement & | stmt | ||
) | [inline] |
Default constructor.
ind | The indentation level |
os | The stream to write out to |
stmt | The statement to generate |
virtual void visit | ( | const Ast::StatementBlock & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::FunctionReturnStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::RoutineReturnStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::TypeSpecStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::EmptyStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::ExprStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::BreakStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::DoWhileStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::WhileStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::IfElseStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::ForeachStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::SelectStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::ContinueStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::SwitchStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::IfThenStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::ForStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::DefineVarStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
virtual void visit | ( | const Ast::LogStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
z::stream& write | ( | ) | [inline] |
Visit current statement.
void writeStatementList | ( | const Ast::StatementList & | list | ) | [inline, private] |
Writes the statement list to the output stream.
list | Statement list |