Zen
A cross-platform functional programming language
Public Member Functions | Private Member Functions | Private Attributes

StatementGenerator Class Reference

Class that generates statements. More...

Inheritance diagram for StatementGenerator:
Statement::Visitor

List of all members.

Public Member Functions

 StatementGenerator (Indenter &ind, z::stream &os, const Ast::Statement &stmt)
 Default constructor.
z::streamwrite ()
 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.

Detailed Description

Class that generates statements.


Constructor & Destructor Documentation

StatementGenerator ( Indenter ind,
z::stream os,
const Ast::Statement stmt 
) [inline]

Default constructor.

Parameters:
indThe indentation level
osThe stream to write out to
stmtThe statement to generate

Member Function Documentation

virtual void visit ( const Ast::StatementBlock stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::FunctionReturnStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::RoutineReturnStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::TypeSpecStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::EmptyStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::ExprStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::BreakStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::DoWhileStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::WhileStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::IfElseStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::ForeachStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::SelectStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::ContinueStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::SwitchStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::IfThenStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::ForStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::DefineVarStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

virtual void visit ( const Ast::LogStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

z::stream& write ( ) [inline]

Visit current statement.

Returns:
The output stream
void writeStatementList ( const Ast::StatementList list) [inline, private]

Writes the statement list to the output stream.

Parameters:
listStatement list

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