Skip to content

Commit

Permalink
Analyze GDScript dpendencies recursively when doing autocompletion
Browse files Browse the repository at this point in the history
  • Loading branch information
HolonProduction committed Apr 29, 2024
1 parent 6118592 commit 0ce6fe5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/gdscript/gdscript_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,10 @@ Ref<GDScriptParserRef> GDScriptParser::get_depended_parser_for(const String &p_p
ref = depended_parsers[p_path];
} else {
Error err = OK;
ref = GDScriptCache::get_parser(p_path, GDScriptParserRef::EMPTY, err, script_path);

// If analyzing for autocompletion, analyze dependencies recursively to provide completion for nested subscripts.
GDScriptParserRef::Status status = for_completion ? GDScriptParserRef::FULLY_SOLVED : GDScriptParserRef::EMPTY;
ref = GDScriptCache::get_parser(p_path, status, err, script_path);
if (ref.is_valid()) {
depended_parsers[p_path] = ref;
}
Expand Down

0 comments on commit 0ce6fe5

Please sign in to comment.