File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -303,7 +303,9 @@ String GDScriptDocGen::docvalue_from_expression(const GDP::ExpressionNode *p_exp
303303 } break ;
304304 case GDP::Node::CALL: {
305305 const GDP::CallNode *call = static_cast <const GDP::CallNode *>(p_expression);
306- return call->function_name .operator String () + (call->arguments .is_empty () ? " ()" : " (...)" );
306+ if (call->get_callee_type () == GDP::Node::IDENTIFIER) {
307+ return call->function_name .operator String () + (call->arguments .is_empty () ? " ()" : " (...)" );
308+ }
307309 } break ;
308310 case GDP::Node::DICTIONARY: {
309311 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
314316 return id->name ;
315317 } break ;
316318 default : {
317- return " <unknown> " ;
319+ // Nothing to do.
318320 } break ;
319321 }
322+
323+ return " <unknown>" ;
320324}
321325
322326void GDScriptDocGen::_generate_docs (GDScript *p_script, const GDP::ClassNode *p_class) {
Original file line number Diff line number Diff line change @@ -841,7 +841,7 @@ static String _make_arguments_hint(const GDScriptParser::FunctionNode *p_functio
841841 const GDScriptParser::CallNode *call = static_cast <const GDScriptParser::CallNode *>(par->initializer );
842842 if (call->is_constant && call->reduced ) {
843843 def_val = call->reduced_value .get_construct_string ();
844- } else {
844+ } else if (call-> get_callee_type () == GDScriptParser::Node::IDENTIFIER) {
845845 def_val = call->function_name .operator String () + (call->arguments .is_empty () ? " ()" : " (...)" );
846846 }
847847 } break ;
You can’t perform that action at this time.
0 commit comments