summaryrefslogtreecommitdiff
path: root/modules/gdscript/language_server
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2020-05-01 19:14:56 -0300
committerGeorge Marques <george@gmarqu.es>2020-07-20 11:38:39 -0300
commit5d6e8538065050d5f5579ec03cfa9e241811e062 (patch)
treec36cdc8d6b4353243dab6afb457db87c84c053e9 /modules/gdscript/language_server
parent818bfbc5b53cc7df4f33493d3ca0a9b74e2cb34a (diff)
New GDScript tokenizer and parser
Sometimes to fix something you have to break it first. This get GDScript mostly working with the new tokenizer and parser but a lot of things isn't working yet. It compiles and it's usable, and that should be enough for now. Don't worry: other huge commits will come after this.
Diffstat (limited to 'modules/gdscript/language_server')
-rw-r--r--modules/gdscript/language_server/gdscript_extend_parser.cpp5
-rw-r--r--modules/gdscript/language_server/gdscript_extend_parser.h5
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp5
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.h5
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.cpp5
-rw-r--r--modules/gdscript/language_server/gdscript_language_server.h5
-rw-r--r--modules/gdscript/language_server/gdscript_text_document.cpp5
-rw-r--r--modules/gdscript/language_server/gdscript_text_document.h5
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.cpp5
-rw-r--r--modules/gdscript/language_server/gdscript_workspace.h5
-rw-r--r--modules/gdscript/language_server/lsp.hpp5
11 files changed, 55 insertions, 0 deletions
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.cpp b/modules/gdscript/language_server/gdscript_extend_parser.cpp
index 385d5dd7cb..897851e950 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.cpp
+++ b/modules/gdscript/language_server/gdscript_extend_parser.cpp
@@ -28,6 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+// FIXME: Reenable LSP.
+#if 0
+
#include "gdscript_extend_parser.h"
#include "../gdscript.h"
@@ -769,3 +772,5 @@ Error ExtendGDScriptParser::parse(const String &p_code, const String &p_path) {
update_document_links(p_code);
return err;
}
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_extend_parser.h b/modules/gdscript/language_server/gdscript_extend_parser.h
index 0c031d7883..f030beac72 100644
--- a/modules/gdscript/language_server/gdscript_extend_parser.h
+++ b/modules/gdscript/language_server/gdscript_extend_parser.h
@@ -31,6 +31,9 @@
#ifndef GDSCRIPT_EXTEND_PARSER_H
#define GDSCRIPT_EXTEND_PARSER_H
+// FIXME: Reenable LSP.
+#if 0
+
#include "../gdscript_parser.h"
#include "core/variant.h"
#include "lsp.hpp"
@@ -100,3 +103,5 @@ public:
};
#endif
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index 2a67d2ff4f..59ec939d24 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -28,6 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+// FIXME: Reenable LSP.
+#if 0
+
#include "gdscript_language_protocol.h"
#include "core/io/json.h"
@@ -303,3 +306,5 @@ GDScriptLanguageProtocol::GDScriptLanguageProtocol() {
set_scope("workspace", workspace.ptr());
workspace->root = ProjectSettings::get_singleton()->get_resource_path();
}
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.h b/modules/gdscript/language_server/gdscript_language_protocol.h
index cf5242e8c5..76f50aa6b3 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.h
+++ b/modules/gdscript/language_server/gdscript_language_protocol.h
@@ -31,6 +31,9 @@
#ifndef GDSCRIPT_PROTOCAL_SERVER_H
#define GDSCRIPT_PROTOCAL_SERVER_H
+// FIXME: Reenable LSP.
+#if 0
+
#include "core/io/stream_peer.h"
#include "core/io/stream_peer_tcp.h"
#include "core/io/tcp_server.h"
@@ -109,3 +112,5 @@ public:
};
#endif
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_language_server.cpp b/modules/gdscript/language_server/gdscript_language_server.cpp
index 3387d262f8..13d7297ff4 100644
--- a/modules/gdscript/language_server/gdscript_language_server.cpp
+++ b/modules/gdscript/language_server/gdscript_language_server.cpp
@@ -28,6 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+// FIXME: Reenable LSP.
+#if 0
+
#include "gdscript_language_server.h"
#include "core/os/file_access.h"
@@ -114,3 +117,5 @@ void register_lsp_types() {
ClassDB::register_class<GDScriptTextDocument>();
ClassDB::register_class<GDScriptWorkspace>();
}
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_language_server.h b/modules/gdscript/language_server/gdscript_language_server.h
index 228d29bf42..92f7a4cac8 100644
--- a/modules/gdscript/language_server/gdscript_language_server.h
+++ b/modules/gdscript/language_server/gdscript_language_server.h
@@ -31,6 +31,9 @@
#ifndef GDSCRIPT_LANGUAGE_SERVER_H
#define GDSCRIPT_LANGUAGE_SERVER_H
+// FIXME: Reenable LSP.
+#if 0
+
#include "../gdscript_parser.h"
#include "editor/editor_plugin.h"
#include "gdscript_language_protocol.h"
@@ -60,4 +63,6 @@ public:
void register_lsp_types();
+#endif
+
#endif // GDSCRIPT_LANGUAGE_SERVER_H
diff --git a/modules/gdscript/language_server/gdscript_text_document.cpp b/modules/gdscript/language_server/gdscript_text_document.cpp
index c6fe3169dc..aed6a2a1b4 100644
--- a/modules/gdscript/language_server/gdscript_text_document.cpp
+++ b/modules/gdscript/language_server/gdscript_text_document.cpp
@@ -38,6 +38,9 @@
#include "gdscript_language_protocol.h"
#include "servers/display_server.h"
+// FIXME: Reenable LSP.
+#if 0
+
void GDScriptTextDocument::_bind_methods() {
ClassDB::bind_method(D_METHOD("didOpen"), &GDScriptTextDocument::didOpen);
ClassDB::bind_method(D_METHOD("didChange"), &GDScriptTextDocument::didChange);
@@ -437,3 +440,5 @@ Array GDScriptTextDocument::find_symbols(const lsp::TextDocumentPositionParams &
}
return arr;
}
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_text_document.h b/modules/gdscript/language_server/gdscript_text_document.h
index b2fd0c31f9..900ea22c28 100644
--- a/modules/gdscript/language_server/gdscript_text_document.h
+++ b/modules/gdscript/language_server/gdscript_text_document.h
@@ -31,6 +31,9 @@
#ifndef GDSCRIPT_TEXT_DOCUMENT_H
#define GDSCRIPT_TEXT_DOCUMENT_H
+// FIXME: Reenable LSP.
+#if 0
+
#include "core/os/file_access.h"
#include "core/reference.h"
#include "lsp.hpp"
@@ -76,3 +79,5 @@ public:
};
#endif
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp
index a203b9bfdb..1e2637e7e1 100644
--- a/modules/gdscript/language_server/gdscript_workspace.cpp
+++ b/modules/gdscript/language_server/gdscript_workspace.cpp
@@ -28,6 +28,9 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+// FIXME: Reenable LSP.
+#if 0
+
#include "gdscript_workspace.h"
#include "../gdscript.h"
@@ -618,3 +621,5 @@ GDScriptWorkspace::~GDScriptWorkspace() {
remove_cache_parser(E->get());
}
}
+
+#endif
diff --git a/modules/gdscript/language_server/gdscript_workspace.h b/modules/gdscript/language_server/gdscript_workspace.h
index e45b06747d..b5dd36321f 100644
--- a/modules/gdscript/language_server/gdscript_workspace.h
+++ b/modules/gdscript/language_server/gdscript_workspace.h
@@ -31,6 +31,9 @@
#ifndef GDSCRIPT_WORKSPACE_H
#define GDSCRIPT_WORKSPACE_H
+// FIXME: Reenable LSP.
+#if 0
+
#include "../gdscript_parser.h"
#include "core/variant.h"
#include "editor/editor_file_system.h"
@@ -95,3 +98,5 @@ public:
};
#endif
+
+#endif
diff --git a/modules/gdscript/language_server/lsp.hpp b/modules/gdscript/language_server/lsp.hpp
index cf27a1578c..4c270aecf1 100644
--- a/modules/gdscript/language_server/lsp.hpp
+++ b/modules/gdscript/language_server/lsp.hpp
@@ -31,6 +31,9 @@
#ifndef GODOT_LSP_H
#define GODOT_LSP_H
+// FIXME: Reenable LSP.
+#if 0
+
#include "core/class_db.h"
#include "core/list.h"
#include "editor/doc_data.h"
@@ -1785,3 +1788,5 @@ static String marked_documentation(const String &p_bbcode) {
} // namespace lsp
#endif
+
+#endif