mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Fix various typos
* Add TODO notes for typos that should be fixed for 5.0 Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
This commit is contained in:
@@ -4508,11 +4508,11 @@ void GDScriptAnalyzer::reduce_identifier(GDScriptParser::IdentifierNode *p_ident
|
||||
result.builtin_type = Variant::OBJECT;
|
||||
result.native_type = SNAME("Node");
|
||||
if (ResourceLoader::get_resource_type(autoload.path) == "GDScript") {
|
||||
Ref<GDScriptParserRef> singl_parser = parser->get_depended_parser_for(autoload.path);
|
||||
if (singl_parser.is_valid()) {
|
||||
Error err = singl_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
|
||||
Ref<GDScriptParserRef> single_parser = parser->get_depended_parser_for(autoload.path);
|
||||
if (single_parser.is_valid()) {
|
||||
Error err = single_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
|
||||
if (err == OK) {
|
||||
result = type_from_metatype(singl_parser->get_parser()->head->get_datatype());
|
||||
result = type_from_metatype(single_parser->get_parser()->head->get_datatype());
|
||||
}
|
||||
}
|
||||
} else if (ResourceLoader::get_resource_type(autoload.path) == "PackedScene") {
|
||||
@@ -4522,11 +4522,11 @@ void GDScriptAnalyzer::reduce_identifier(GDScriptParser::IdentifierNode *p_ident
|
||||
if (node != nullptr) {
|
||||
Ref<GDScript> scr = node->get_script();
|
||||
if (scr.is_valid()) {
|
||||
Ref<GDScriptParserRef> singl_parser = parser->get_depended_parser_for(scr->get_script_path());
|
||||
if (singl_parser.is_valid()) {
|
||||
Error err = singl_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
|
||||
Ref<GDScriptParserRef> single_parser = parser->get_depended_parser_for(scr->get_script_path());
|
||||
if (single_parser.is_valid()) {
|
||||
Error err = single_parser->raise_status(GDScriptParserRef::INHERITANCE_SOLVED);
|
||||
if (err == OK) {
|
||||
result = type_from_metatype(singl_parser->get_parser()->head->get_datatype());
|
||||
result = type_from_metatype(single_parser->get_parser()->head->get_datatype());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2249,7 +2249,7 @@ static bool _guess_identifier_type(GDScriptParser::CompletionContext &p_context,
|
||||
// Operator `is` used, check if identifier is in there! this helps resolve in blocks that are (if (identifier is value)): which are very common..
|
||||
// Super dirty hack, but very useful.
|
||||
// Credit: Zylann.
|
||||
// TODO: this could be hacked to detect ANDed conditions too...
|
||||
// TODO: this could be hacked to detect AND-ed conditions too...
|
||||
const GDScriptParser::TypeTestNode *type_test = static_cast<const GDScriptParser::TypeTestNode *>(suite->parent_if->condition);
|
||||
if (type_test->operand && type_test->test_type && type_test->operand->type == GDScriptParser::Node::IDENTIFIER && static_cast<const GDScriptParser::IdentifierNode *>(type_test->operand)->name == p_identifier->name && static_cast<const GDScriptParser::IdentifierNode *>(type_test->operand)->source == p_identifier->source) {
|
||||
// Bingo.
|
||||
|
||||
@@ -43,12 +43,12 @@
|
||||
#define COLUMN_NUMBER_TO_INDEX(p_column) ((p_column) - 1)
|
||||
#endif
|
||||
|
||||
#ifndef SYMBOL_SEPERATOR
|
||||
#define SYMBOL_SEPERATOR "::"
|
||||
#ifndef SYMBOL_SEPARATOR
|
||||
#define SYMBOL_SEPARATOR "::"
|
||||
#endif
|
||||
|
||||
#ifndef JOIN_SYMBOLS
|
||||
#define JOIN_SYMBOLS(p_path, name) ((p_path) + SYMBOL_SEPERATOR + (name))
|
||||
#define JOIN_SYMBOLS(p_path, name) ((p_path) + SYMBOL_SEPARATOR + (name))
|
||||
#endif
|
||||
|
||||
typedef HashMap<String, const lsp::DocumentSymbol *> ClassMembers;
|
||||
|
||||
@@ -307,7 +307,7 @@ Dictionary GDScriptTextDocument::resolve(const Dictionary &p_params) {
|
||||
} else if (data.is_string()) {
|
||||
String query = data;
|
||||
|
||||
Vector<String> param_symbols = query.split(SYMBOL_SEPERATOR, false);
|
||||
Vector<String> param_symbols = query.split(SYMBOL_SEPARATOR, false);
|
||||
|
||||
if (param_symbols.size() >= 2) {
|
||||
StringName class_name = param_symbols[0];
|
||||
|
||||
Reference in New Issue
Block a user