#include "LSPServer.h"
#include "TableGenServer.h"
#include "mlir/Tools/lsp-server-support/Logging.h"
#include "mlir/Tools/lsp-server-support/Protocol.h"
#include "mlir/Tools/lsp-server-support/Transport.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/StringMap.h"
#include <optional>
usingnamespacemlir;
usingnamespacemlir::lsp;
namespace {
struct LSPServer { … };
}
void LSPServer::onInitialize(const InitializeParams ¶ms,
Callback<llvm::json::Value> reply) { … }
void LSPServer::onInitialized(const InitializedParams &) { … }
void LSPServer::onShutdown(const NoParams &, Callback<std::nullptr_t> reply) { … }
void LSPServer::onDocumentDidOpen(const DidOpenTextDocumentParams ¶ms) { … }
void LSPServer::onDocumentDidClose(const DidCloseTextDocumentParams ¶ms) { … }
void LSPServer::onDocumentDidChange(const DidChangeTextDocumentParams ¶ms) { … }
void LSPServer::onGoToDefinition(const TextDocumentPositionParams ¶ms,
Callback<std::vector<Location>> reply) { … }
void LSPServer::onReference(const ReferenceParams ¶ms,
Callback<std::vector<Location>> reply) { … }
void LSPServer::onDocumentLink(const DocumentLinkParams ¶ms,
Callback<std::vector<DocumentLink>> reply) { … }
void LSPServer::onHover(const TextDocumentPositionParams ¶ms,
Callback<std::optional<Hover>> reply) { … }
LogicalResult mlir::lsp::runTableGenLSPServer(TableGenServer &server,
JSONTransport &transport) { … }