mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
GDScript: Cache scripts after parse error
This commit is contained in:
parent
98da707df5
commit
5ef971da1a
1 changed files with 2 additions and 4 deletions
|
|
@ -242,11 +242,9 @@ Ref<GDScript> GDScriptCache::get_shallow_script(const String &p_path, Error &r_e
|
||||||
script->load_source_code(p_path);
|
script->load_source_code(p_path);
|
||||||
|
|
||||||
Ref<GDScriptParserRef> parser_ref = get_parser(p_path, GDScriptParserRef::PARSED, r_error);
|
Ref<GDScriptParserRef> parser_ref = get_parser(p_path, GDScriptParserRef::PARSED, r_error);
|
||||||
if (r_error != OK) {
|
if (r_error == OK) {
|
||||||
return script;
|
|
||||||
}
|
|
||||||
|
|
||||||
GDScriptCompiler::make_scripts(script.ptr(), parser_ref->get_parser()->get_tree(), true);
|
GDScriptCompiler::make_scripts(script.ptr(), parser_ref->get_parser()->get_tree(), true);
|
||||||
|
}
|
||||||
|
|
||||||
singleton->shallow_gdscript_cache[p_path] = script;
|
singleton->shallow_gdscript_cache[p_path] = script;
|
||||||
return script;
|
return script;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue