diff options
author | rune-scape <allie.smith.epic@gmail.com> | 2023-07-24 15:49:39 +0200 |
---|---|---|
committer | Yuri Sizov <yuris@humnom.net> | 2023-07-24 15:49:39 +0200 |
commit | 83b01708b2cbda0cf1080cd8fad8face9f988627 (patch) | |
tree | 1bac56fa0115171cc4fd42406d5a58e5a6772570 /modules/gdscript/gdscript_editor.cpp | |
parent | 6588a4a29af1621086feac0117d5d4d37af957fd (diff) | |
download | redot-engine-83b01708b2cbda0cf1080cd8fad8face9f988627.tar.gz |
Script editor: Show depended script errors
Diffstat (limited to 'modules/gdscript/gdscript_editor.cpp')
-rw-r--r-- | modules/gdscript/gdscript_editor.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/gdscript/gdscript_editor.cpp b/modules/gdscript/gdscript_editor.cpp index cd34feb8b3..79aba4f1a3 100644 --- a/modules/gdscript/gdscript_editor.cpp +++ b/modules/gdscript/gdscript_editor.cpp @@ -143,14 +143,26 @@ bool GDScriptLanguage::validate(const String &p_script, const String &p_path, Li #endif if (err) { if (r_errors) { - for (const GDScriptParser::ParserError &E : parser.get_errors()) { - const GDScriptParser::ParserError &pe = E; + for (const GDScriptParser::ParserError &pe : parser.get_errors()) { ScriptLanguage::ScriptError e; + e.path = p_path; e.line = pe.line; e.column = pe.column; e.message = pe.message; r_errors->push_back(e); } + + for (KeyValue<String, Ref<GDScriptParserRef>> E : analyzer.get_depended_parsers()) { + GDScriptParser *depended_parser = E.value->get_parser(); + for (const GDScriptParser::ParserError &pe : depended_parser->get_errors()) { + ScriptLanguage::ScriptError e; + e.path = E.key; + e.line = pe.line; + e.column = pe.column; + e.message = pe.message; + r_errors->push_back(e); + } + } } return false; } else { |