Implement the VLS roadmap on the native VBS build
Native VBS and CMake builds of the server and every registered suite: protocol and document sync, VBS/compdb providers, stock GCC diagnostics (including in-process default profile preparation), the stock occurrence observer and hover/definition, the bounded Scheduler, C++ module graph, scan and artifact cache with real CMI production, the context-aware symbol index with schema-2 snapshot migration, navigation and guarded rename, reflection provenance with splice-origin extraction, index-backed completion and signature help, live GCC worker control with a registered DAP suite, and the Neovim and VS Code clients. VoidLibrary follows main. The private GCC 16.2.0 frontend is reproduced from the versioned patches and verified stepping reflection/template code with projected values 17/34 and 41/82.
This commit is contained in:
1 parent
ca04975d54
commit
da8003f6d4
310 files changed
+47552
-480
No files matched your search
+27
-14
@@ -1,23 +1,36 @@
|
||||
#pragma once
|
||||
|
||||
#include <Void/Data/StrictJson.hpp>
|
||||
#include <Void/LanguageServer/Protocol/Json.hpp>
|
||||
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <expected>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <variant>
|
||||
#include <stdexcept>
|
||||
#include <utility>
|
||||
|
||||
namespace vls {
|
||||
|
||||
using Json = Void::Json::Strict::Value;
|
||||
using RequestId = std::variant<std::int32_t, std::string>;
|
||||
using Void::LanguageServer::Protocol::Json;
|
||||
using Void::LanguageServer::Protocol::parse_json;
|
||||
using Void::LanguageServer::Protocol::request_id;
|
||||
using Void::LanguageServer::Protocol::RequestId;
|
||||
|
||||
[[nodiscard]] std::expected<Json, std::string> parse_json(std::string_view text,
|
||||
std::size_t maximum_depth = 64);
|
||||
[[nodiscard]] std::expected<RequestId, std::string> request_id(const Json &value);
|
||||
[[nodiscard]] std::string quote_json(std::string_view text);
|
||||
[[nodiscard]] std::string encode_id(const RequestId &id);
|
||||
namespace detail {
|
||||
|
||||
inline std::string require_json_encoding(std::expected<std::string, std::string> encoded) {
|
||||
if (!encoded) {
|
||||
throw std::invalid_argument{encoded.error()};
|
||||
}
|
||||
return std::move(*encoded);
|
||||
}
|
||||
|
||||
} // namespace detail
|
||||
|
||||
[[nodiscard]] inline std::string quote_json(std::string_view text) {
|
||||
return detail::require_json_encoding(
|
||||
Void::LanguageServer::Protocol::serialize_json(Json{std::string{text}}));
|
||||
}
|
||||
|
||||
[[nodiscard]] inline std::string encode_id(const RequestId &id) {
|
||||
return detail::require_json_encoding(Void::LanguageServer::Protocol::serialize_json(
|
||||
Void::LanguageServer::Protocol::request_id_json(id)));
|
||||
}
|
||||
|
||||
} // namespace vls
|
||||
Reference in new issue
Block a user