1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

GDScript: Implement lambdas compilation and runtime

This commit is contained in:
George Marques
2021-03-28 11:03:13 -03:00
parent 3155368093
commit c201b212c7
16 changed files with 364 additions and 39 deletions

View File

@@ -796,7 +796,8 @@ public:
struct LambdaNode : public ExpressionNode {
FunctionNode *function = nullptr;
FunctionNode *parent_function = nullptr;
Map<StringName, IdentifierNode *> captures;
Vector<IdentifierNode *> captures;
Map<StringName, int> captures_indices;
bool has_name() const {
return function && function->identifier;