Zen
A cross-platform functional programming language
|
Class that collects external references from statements. More...
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. |
Class that collects external references from statements.
StatementVisitor | ( | zbl::RefCollector & | ctx | ) | [inline] |
Default constructor.
ctx | The collector context |
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::LogStatement & | 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::IfThenStatement & | 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::BreakStatement & | 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::ForStatement & | 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::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::IfElseStatement & | 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::ExprStatement & | 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::SelectStatement & | stmt | ) | [inline, private, virtual] |
Abstract visitor function.
stmt | The statement reference to handle |
Implements Statement::Visitor.
void visitFunctionDef | ( | const Ast::FunctionDef & | fdef, |
const Ast::FunctionBlock & | block | ||
) | [inline] |
Visit function def and function block.
fdef | The function def whose in-params are to be included |
block | The function block to be visited |
void visitStatement | ( | const Ast::Statement & | stmt | ) | [inline] |
Visit statement.
stmt | The statement to visit |
void visitStatementList | ( | const Ast::StatementList & | list | ) | [inline] |
Visit statement list.
list | The statement list to visit |
void visitStatementList | ( | const Ast::FunctionDef & | fdef, |
const Ast::StatementList & | list | ||
) | [inline] |
Visit statement list and in-params.
fdef | The function def whose in-params are to be included |
list | The statement list to visit |