![]() |
Zen
A cross-platform functional programming language
|
Concrete class for AST Node representing a templated dictionary instantiation. More...
#include <Ast.hpp>
Public Member Functions | |
| DictTemplateExpr (const QualifiedType &type, const ExprList &list) | |
| Default constructor. | |
Private Member Functions | |
| virtual void | visit (Expr::Visitor &visitor) const |
| Abstract visitor function. | |
Concrete class for AST Node representing a templated dictionary instantiation.
This creates an instance of a dictionary. For example:
local y = dict<string, int>[];
Here, y is an instance of a dictionary holding string:int pairs. This is usually only required when y needs to be an empty dictionary. At other times, this:
local y = ["a":1, "b":2];
is sufficient. The compiler will automatically deduce the type of the dictionary at compile time.
| DictTemplateExpr | ( | const QualifiedType & | type, |
| const ExprList & | list | ||
| ) | [inline] |
Default constructor.
| type | Expression type |
| list | The initialization parameters |
| void visit | ( | Expr::Visitor & | visitor | ) | const [private, virtual] |