summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-08-10 12:29:11 +0200
committerGitHub <noreply@github.com>2022-08-10 12:29:11 +0200
commitabe98a95c54b366962f3bbd37eca107ab207e060 (patch)
tree3c4cf849b536c6797b0cc3bbf07678f0e3937fb4
parent6b84619136d4748a13d7710feb0313cbade502c5 (diff)
parentdf85c9871f06f244e6232f51319ee7a9223e4798 (diff)
Merge pull request #64206 from Chaosus/gds_fix
-rw-r--r--modules/gdscript/gdscript_editor.cpp66
1 files changed, 33 insertions, 33 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp
index d943974ce4..2613e1c626 100644
--- a/modules/gdscript/gdscript_editor.cpp
+++ b/modules/gdscript/gdscript_editor.cpp
@@ -2517,39 +2517,7 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
GDScriptCompletionIdentifier connect_base;
- if (Variant::has_utility_function(call->function_name)) {
- MethodInfo info = Variant::get_utility_function_info(call->function_name);
- r_arghint = _make_arguments_hint(info, p_argidx);
- return;
- } else if (GDScriptUtilityFunctions::function_exists(call->function_name)) {
- MethodInfo info = GDScriptUtilityFunctions::get_function_info(call->function_name);
- r_arghint = _make_arguments_hint(info, p_argidx);
- return;
- } else if (GDScriptParser::get_builtin_type(call->function_name) < Variant::VARIANT_MAX) {
- // Complete constructor.
- List<MethodInfo> constructors;
- Variant::get_constructor_list(GDScriptParser::get_builtin_type(call->function_name), &constructors);
-
- int i = 0;
- for (const MethodInfo &E : constructors) {
- if (p_argidx >= E.arguments.size()) {
- continue;
- }
- if (i > 0) {
- r_arghint += "\n";
- }
- r_arghint += _make_arguments_hint(E, p_argidx);
- i++;
- }
- return;
- } else if (call->is_super || callee_type == GDScriptParser::Node::IDENTIFIER) {
- base = p_context.base;
-
- if (p_context.current_class) {
- base_type = p_context.current_class->get_datatype();
- _static = !p_context.current_function || p_context.current_function->is_static;
- }
- } else if (callee_type == GDScriptParser::Node::SUBSCRIPT) {
+ if (callee_type == GDScriptParser::Node::SUBSCRIPT) {
const GDScriptParser::SubscriptNode *subscript = static_cast<const GDScriptParser::SubscriptNode *>(call->callee);
if (subscript->base != nullptr && subscript->base->type == GDScriptParser::Node::IDENTIFIER) {
@@ -2589,6 +2557,38 @@ static void _find_call_arguments(GDScriptParser::CompletionContext &p_context, c
_static = base_type.is_meta_type;
}
+ } else if (Variant::has_utility_function(call->function_name)) {
+ MethodInfo info = Variant::get_utility_function_info(call->function_name);
+ r_arghint = _make_arguments_hint(info, p_argidx);
+ return;
+ } else if (GDScriptUtilityFunctions::function_exists(call->function_name)) {
+ MethodInfo info = GDScriptUtilityFunctions::get_function_info(call->function_name);
+ r_arghint = _make_arguments_hint(info, p_argidx);
+ return;
+ } else if (GDScriptParser::get_builtin_type(call->function_name) < Variant::VARIANT_MAX) {
+ // Complete constructor.
+ List<MethodInfo> constructors;
+ Variant::get_constructor_list(GDScriptParser::get_builtin_type(call->function_name), &constructors);
+
+ int i = 0;
+ for (const MethodInfo &E : constructors) {
+ if (p_argidx >= E.arguments.size()) {
+ continue;
+ }
+ if (i > 0) {
+ r_arghint += "\n";
+ }
+ r_arghint += _make_arguments_hint(E, p_argidx);
+ i++;
+ }
+ return;
+ } else if (call->is_super || callee_type == GDScriptParser::Node::IDENTIFIER) {
+ base = p_context.base;
+
+ if (p_context.current_class) {
+ base_type = p_context.current_class->get_datatype();
+ _static = !p_context.current_function || p_context.current_function->is_static;
+ }
} else {
return;
}