Zen
A cross-platform functional programming language

InstanceExpr Class Reference

Abstract base class for AST Nodes representing an instantiation expression. More...

#include <Ast.hpp>

Inheritance diagram for InstanceExpr:
Expr Node DictTemplateExpr FunctionExpr ListTemplateExpr StructExpr TypeDefExpr

List of all members.

Public Member Functions

 InstanceExpr (const QualifiedType &type, const Ast::ExprList &list)
 Default constructor.
const Ast::ExprListgetList () const
 Returns the list of initialization parameters.

Private Attributes

const Ast::ExprList_list
 The parameter list.

Detailed Description

Abstract base class for AST Nodes representing an instantiation expression.

An instantiation expression creates an instance of a type. It uses square brackets to differentiate itself from a function call. For example:

        local y = MyFunction[];

Here, MyFunction is a function, and y now holds an instance of that function. It can be treated as any first-class variable. It can be passed to another function, or saved for future use. The square brackets can contain an expression list of initialization parameters wherever applicable.


Constructor & Destructor Documentation

InstanceExpr ( const QualifiedType type,
const Ast::ExprList list 
) [inline]

Default constructor.

Parameters:
typeExpression type
listThe initialization parameters

Member Function Documentation

const Ast::ExprList& getList ( ) const [inline]

Returns the list of initialization parameters.

Returns:
The parameter list

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