From d0e78c86d72de1ec5d1c49de5c5ee2fff9589efc Mon Sep 17 00:00:00 2001 From: Eric M Date: Tue, 18 May 2021 13:09:19 +1000 Subject: Added support for scripts reporting multiple errors to ScriptTextEditor Scripts can now report multiple errors to the scripting editors in the engine. UI elements were added to support multiple errors. --- core/object/script_language.h | 8 ++- editor/code_editor.cpp | 65 ++++++++++++------ editor/code_editor.h | 9 ++- editor/plugins/script_text_editor.cpp | 79 ++++++++++++++++++---- editor/plugins/script_text_editor.h | 3 + editor/plugins/shader_editor_plugin.cpp | 4 +- .../include/pluginscript/godot_pluginscript.h | 2 +- modules/gdnative/nativescript/nativescript.cpp | 2 +- modules/gdnative/nativescript/nativescript.h | 2 +- .../pluginscript/pluginscript_language.cpp | 19 ++++-- .../gdnative/pluginscript/pluginscript_language.h | 2 +- modules/gdscript/gdscript.h | 2 +- modules/gdscript/gdscript_editor.cpp | 20 ++++-- modules/mono/csharp_script.h | 5 +- modules/visual_script/visual_script.cpp | 2 +- modules/visual_script/visual_script.h | 2 +- 16 files changed, 163 insertions(+), 63 deletions(-) diff --git a/core/object/script_language.h b/core/object/script_language.h index a22e91870e..5d1f6a0deb 100644 --- a/core/object/script_language.h +++ b/core/object/script_language.h @@ -268,6 +268,12 @@ public: String message; }; + struct ScriptError { + int line = -1; + int column = -1; + String message; + }; + void get_core_type_words(List *p_core_type_words) const; virtual void get_reserved_words(List *p_words) const = 0; virtual bool is_control_flow_keyword(String p_string) const = 0; @@ -276,7 +282,7 @@ public: virtual Ref