GDScript: Add support for variadic functions

This commit is contained in:
Danil Alexeev 2025-03-30 12:59:05 +03:00
parent 3b963ab8b6
commit ee121ef80e
No known key found for this signature in database
GPG key ID: 5A52F75A8679EC57
33 changed files with 416 additions and 65 deletions

View file

@ -851,6 +851,7 @@ public:
IdentifierNode *identifier = nullptr;
Vector<ParameterNode *> parameters;
HashMap<StringName, int> parameters_indices;
ParameterNode *rest_parameter = nullptr;
TypeNode *return_type = nullptr;
SuiteNode *body = nullptr;
bool is_abstract = false;
@ -869,6 +870,8 @@ public:
bool resolved_signature = false;
bool resolved_body = false;
_FORCE_INLINE_ bool is_vararg() const { return rest_parameter != nullptr; }
FunctionNode() {
type = FUNCTION;
}