1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-30 18:30:54 +00:00

LSP: Fix infinite recursion in symbol calculation

This commit is contained in:
HolonProduction
2025-12-28 19:11:29 +01:00
parent 63227bbc8a
commit a1fb9daae1

View File

@@ -389,12 +389,15 @@ ExtendGDScriptParser *GDScriptLanguageProtocol::LSPeer::parse_script(const Strin
}
ExtendGDScriptParser *parser = memnew(ExtendGDScriptParser);
parse_results[p_path] = parser;
parser->parse(content, p_path);
if (document != nullptr) {
parse_results[p_path] = parser;
GDScriptLanguageProtocol::get_singleton()->get_workspace()->publish_diagnostics(p_path);
} else {
// Don't keep cached for further requests since we can't invalidate the cache properly.
parse_results.erase(p_path);
stale_parsers[p_path] = parser;
}