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

ClosureVisitor Class Reference

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

Inheritance diagram for ClosureVisitor:
Closure::Visitor

List of all members.

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.

Detailed Description

Class that collects external references from closures.


Constructor & Destructor Documentation

Default constructor.

Parameters:
ctxThe collector context
dsiThe stack item for thsi collection

Member Function Documentation

void collectXRefs ( const Ast::VariableRefList xRefList) [inline, private]

Add external references from list if not already present.

Parameters:
xRefListThe external reference list
virtual void visit ( const Ast::ReturnClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

virtual void visit ( const Ast::ExitClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

virtual void visit ( const Ast::CallClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

virtual void visit ( const Ast::SharedClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

virtual void visit ( const Ast::LoopClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

virtual void visit ( const Ast::FunctionCallClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

virtual void visit ( const Ast::RunClosure closure) [inline, private, virtual]

Abstract visitor function.

Parameters:
closureThe closure reference to handle

Implements Closure::Visitor.

void visitClosure ( const Ast::Closure closure) [inline]

Visit specified closure.

Parameters:
closureThe closure to visit

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