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

GDScript: Fix call hint appearance for complex callees

This commit is contained in:
Danil Alexeev
2025-06-23 19:18:22 +03:00
parent 88b9932ce1
commit fbede89573
2 changed files with 7 additions and 3 deletions

View File

@@ -303,7 +303,9 @@ String GDScriptDocGen::docvalue_from_expression(const GDP::ExpressionNode *p_exp
} break;
case GDP::Node::CALL: {
const GDP::CallNode *call = static_cast<const GDP::CallNode *>(p_expression);
return call->function_name.operator String() + (call->arguments.is_empty() ? "()" : "(...)");
if (call->get_callee_type() == GDP::Node::IDENTIFIER) {
return call->function_name.operator String() + (call->arguments.is_empty() ? "()" : "(...)");
}
} break;
case GDP::Node::DICTIONARY: {
const GDP::DictionaryNode *dict = static_cast<const GDP::DictionaryNode *>(p_expression);
@@ -314,9 +316,11 @@ String GDScriptDocGen::docvalue_from_expression(const GDP::ExpressionNode *p_exp
return id->name;
} break;
default: {
return "<unknown>";
// Nothing to do.
} break;
}
return "<unknown>";
}
void GDScriptDocGen::_generate_docs(GDScript *p_script, const GDP::ClassNode *p_class) {