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

StatementVisitor Class Reference

Class that collects external references from statements. More...

Inheritance diagram for StatementVisitor:
Statement::Visitor

List of all members.

Public Member Functions

 StatementVisitor (zbl::RefCollector &ctx)
 Default constructor.
void visitStatement (const Ast::Statement &stmt)
 Visit statement.
void visitStatementList (const Ast::StatementList &list)
 Visit statement list.
void visitStatementList (const Ast::FunctionDef &fdef, const Ast::StatementList &list)
 Visit statement list and in-params.
void visitFunctionDef (const Ast::FunctionDef &fdef, const Ast::FunctionBlock &block)
 Visit function def and function block.

Private Member Functions

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

zbl::RefCollector_ctx
 Reference to collection context.

Detailed Description

Class that collects external references from statements.


Constructor & Destructor Documentation

StatementVisitor ( zbl::RefCollector ctx) [inline]

Default constructor.

Parameters:
ctxThe collector context

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::LogStatement 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::IfThenStatement 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::BreakStatement 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::ForStatement 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::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::IfElseStatement 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::ExprStatement 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::SelectStatement stmt) [inline, private, virtual]

Abstract visitor function.

Parameters:
stmtThe statement reference to handle

Implements Statement::Visitor.

void visitFunctionDef ( const Ast::FunctionDef fdef,
const Ast::FunctionBlock block 
) [inline]

Visit function def and function block.

Parameters:
fdefThe function def whose in-params are to be included
blockThe function block to be visited
void visitStatement ( const Ast::Statement stmt) [inline]

Visit statement.

Parameters:
stmtThe statement to visit
void visitStatementList ( const Ast::StatementList list) [inline]

Visit statement list.

Parameters:
listThe statement list to visit
void visitStatementList ( const Ast::FunctionDef fdef,
const Ast::StatementList list 
) [inline]

Visit statement list and in-params.

Parameters:
fdefThe function def whose in-params are to be included
listThe statement list to visit

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