Zen
A cross-platform functional programming language

FunctionExpr Class Reference

Concrete class for AST Node representing a function instantiation. More...

#include <Ast.hpp>

Inheritance diagram for FunctionExpr:
InstanceExpr Expr Node

List of all members.

Public Member Functions

 FunctionExpr (const QualifiedType &type, const FunctionDef &function, const ExprList &list)
 Default constructor.
const FunctionDefgetFunction () const
 Returns the function definition to be instantiated.

Private Member Functions

virtual void visit (Expr::Visitor &visitor) const
 Abstract visitor function.

Private Attributes

const FunctionDef_function
 The function definition.

Detailed Description

Concrete class for AST Node representing a function instantiation.

This creates an instance of a function. For example:

        function () MyFunction () {...};
        ...
        local y = MyFunction[];

Here, y is an instance of X, which is a function definition.


Constructor & Destructor Documentation

FunctionExpr ( const QualifiedType type,
const FunctionDef function,
const ExprList list 
) [inline]

Default constructor.

Parameters:
typeExpression type
functionThe function definition to be instantiated (This is the same as type.getTypeSpec() )
listThe initialization parameters

Member Function Documentation

const FunctionDef& getFunction ( ) const [inline]

Returns the function definition to be instantiated.

Returns:
The function definition
void visit ( Expr::Visitor visitor) const [private, virtual]

Abstract visitor function.

Parameters:
visitorThe visitor object.

Implements Expr.


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