diff --git a/icons/JavaScriptInternal.svg b/icons/JavaScriptModule.svg similarity index 100% rename from icons/JavaScriptInternal.svg rename to icons/JavaScriptModule.svg diff --git a/javascript.h b/javascript.h index 98bfc4eb..68c7eb30 100644 --- a/javascript.h +++ b/javascript.h @@ -14,6 +14,7 @@ #define EXT_TSCLASS "ts" #define EXT_JSMODULE "js" #define EXT_JSON "json" +#define EXT_GENERATE "//generatedPath=" class JavaScript : public Script { GDCLASS(JavaScript, Script); diff --git a/src/language/javascript_todo_texteditor.cpp b/src/language/javascript_todo_texteditor.cpp index c8d2dec1..e3702ae9 100644 --- a/src/language/javascript_todo_texteditor.cpp +++ b/src/language/javascript_todo_texteditor.cpp @@ -2,13 +2,84 @@ #include "javascript_language.h" +#include +#include +#include + int JavaScriptLanguage::find_function(const String &p_function, const String &p_code) const { return -1; } String JavaScriptLanguage::make_function(const String &p_class, const String &p_name, const PackedStringArray &p_args) const { return ""; } void JavaScriptLanguage::auto_indent_code(String &p_code, int p_from_line, int p_to_line) const {} bool JavaScriptLanguage::supports_documentation() const { return false; } bool JavaScriptLanguage::can_inherit_from_file() const { return false; } -Error JavaScriptLanguage::open_in_external_editor(const Ref