Zen
A cross-platform functional programming language
|
Class that collects external references from closures. More...
Public Member Functions | |
ClosureVisitor (zbl::RefCollector &ctx, zbl::RefCollector::DefStackItem &dsi) | |
Default constructor. | |
void | visitClosure (const Ast::Closure &closure) |
Visit specified closure. | |
Private Member Functions | |
void | collectXRefs (const Ast::VariableRefList &xRefList) |
Add external references from list if not already present. | |
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::LoopClosure &closure) |
Abstract visitor function. | |
virtual void | visit (const Ast::SharedClosure &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::ReturnClosure &closure) |
Abstract visitor function. | |
Private Attributes | |
zbl::RefCollector & | _ctx |
Reference to collection context. | |
zbl::RefCollector::DefStackItem & | _dsi |
Reference to stack item. |
Class that collects external references from closures.
ClosureVisitor | ( | zbl::RefCollector & | ctx, |
zbl::RefCollector::DefStackItem & | dsi | ||
) | [inline] |
Default constructor.
ctx | The collector context |
dsi | The stack item for thsi collection |
void collectXRefs | ( | const Ast::VariableRefList & | xRefList | ) | [inline, private] |
Add external references from list if not already present.
xRefList | The external reference list |
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::CallClosure & | 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::FunctionCallClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
closure | The closure reference to handle |
Implements Closure::Visitor.
virtual void visit | ( | const Ast::RunClosure & | closure | ) | [inline, private, virtual] |
Abstract visitor function.
closure | The closure reference to handle |
Implements Closure::Visitor.
void visitClosure | ( | const Ast::Closure & | closure | ) | [inline] |
Visit specified closure.
closure | The closure to visit |