diff options
author | Dmitrii Maganov <vonagam@gmail.com> | 2022-12-22 22:43:36 +0200 |
---|---|---|
committer | Dmitrii Maganov <vonagam@gmail.com> | 2023-01-06 01:10:04 +0200 |
commit | a1d06749f18c3f47c6443ece2ec625d8ee5f1761 (patch) | |
tree | 542a407dd9c60c76c3f2acf1a76f06cf44b1dfde /modules/gdscript/language_server | |
parent | 1d14c054a12dacdc193b589e4afb0ef319ee2aae (diff) |
Unify typing of variables, constants and parameters in GDScript
Diffstat (limited to 'modules/gdscript/language_server')
-rw-r--r-- | modules/gdscript/language_server/gdscript_extend_parser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp index a96730b6ff..146ed10ceb 100644 --- a/modules/gdscript/language_server/gdscript_extend_parser.cpp +++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp @@ -350,8 +350,8 @@ void ExtendGDScriptParser::parse_function_symbol(const GDScriptParser::FunctionN if (parameter->get_datatype().is_hard_type()) { parameters += ": " + parameter->get_datatype().to_string(); } - if (parameter->default_value != nullptr) { - parameters += " = " + parameter->default_value->reduced_value.to_json_string(); + if (parameter->initializer != nullptr) { + parameters += " = " + parameter->initializer->reduced_value.to_json_string(); } } r_symbol.detail += parameters + ")"; @@ -695,8 +695,8 @@ Dictionary ExtendGDScriptParser::dump_function_api(const GDScriptParser::Functio Dictionary arg; arg["name"] = p_func->parameters[i]->identifier->name; arg["type"] = p_func->parameters[i]->get_datatype().to_string(); - if (p_func->parameters[i]->default_value != nullptr) { - arg["default_value"] = p_func->parameters[i]->default_value->reduced_value; + if (p_func->parameters[i]->initializer != nullptr) { + arg["default_value"] = p_func->parameters[i]->initializer->reduced_value; } parameters.push_back(arg); } |