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.
37 lines
1002 B
C++
37 lines
1002 B
C++
#pragma once
|
|
|
|
#include <Void/LanguageServer/Protocol/Json.hpp>
|
|
|
|
#include <stdexcept>
|
|
#include <utility>
|
|
|
|
namespace vls {
|
|
|
|
using Void::LanguageServer::Protocol::Json;
|
|
using Void::LanguageServer::Protocol::parse_json;
|
|
using Void::LanguageServer::Protocol::request_id;
|
|
using Void::LanguageServer::Protocol::RequestId;
|
|
|
|
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
|