Zen
A cross-platform functional programming language
|
Abstract base class for AST Nodes representing an instantiation expression. More...
#include <Ast.hpp>
Public Member Functions | |
InstanceExpr (const QualifiedType &type, const Ast::ExprList &list) | |
Default constructor. | |
const Ast::ExprList & | getList () const |
Returns the list of initialization parameters. | |
Private Attributes | |
const Ast::ExprList & | _list |
The parameter list. |
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.
InstanceExpr | ( | const QualifiedType & | type, |
const Ast::ExprList & | list | ||
) | [inline] |
Default constructor.
type | Expression type |
list | The initialization parameters |
const Ast::ExprList& getList | ( | ) | const [inline] |
Returns the list of initialization parameters.