GDScript: Add disassembling implicit and lambda functions

This commit is contained in:
Danil Alexeev 2024-11-26 14:50:06 +03:00
parent d09d82d433
commit a73573b093
No known key found for this signature in database
GPG key ID: 5A52F75A8679EC57
4 changed files with 77 additions and 36 deletions

View file

@ -2266,7 +2266,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
return_type = _gdtype_from_datatype(p_func->get_datatype(), p_script);
} else {
if (p_for_ready) {
func_name = SceneStringName(_ready);
func_name = "@implicit_ready";
} else {
func_name = "@implicit_new";
}
@ -2351,7 +2351,7 @@ GDScriptFunction *GDScriptCompiler::_parse_function(Error &r_error, GDScript *p_
}
if (field->onready != is_implicit_ready) {
// Only initialize in @implicit_ready.
// Only initialize in `@implicit_ready()`.
continue;
}
@ -2953,7 +2953,7 @@ Error GDScriptCompiler::_compile_class(GDScript *p_script, const GDScriptParser:
}
{
// Create an implicit constructor in any case.
// Create `@implicit_new()` special function in any case.
Error err = OK;
_parse_function(err, p_script, p_class, nullptr);
if (err) {
@ -2962,7 +2962,7 @@ Error GDScriptCompiler::_compile_class(GDScript *p_script, const GDScriptParser:
}
if (p_class->onready_used) {
// Create an implicit_ready constructor.
// Create `@implicit_ready()` special function.
Error err = OK;
_parse_function(err, p_script, p_class, nullptr, true);
if (err) {