#include "LSPServer.h"
#include "PDLLServer.h"
#include "Protocol.h"
#include "mlir/Tools/lsp-server-support/Logging.h"
#include "mlir/Tools/lsp-server-support/Transport.h"
#include "llvm/ADT/FunctionExtras.h"
#include "llvm/ADT/StringMap.h"
#include <optional>
#define DEBUG_TYPE …
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) { … }
void LSPServer::onDocumentSymbol(const DocumentSymbolParams ¶ms,
Callback<std::vector<DocumentSymbol>> reply) { … }
void LSPServer::onCompletion(const CompletionParams ¶ms,
Callback<CompletionList> reply) { … }
void LSPServer::onSignatureHelp(const TextDocumentPositionParams ¶ms,
Callback<SignatureHelp> reply) { … }
void LSPServer::onInlayHint(const InlayHintsParams ¶ms,
Callback<std::vector<InlayHint>> reply) { … }
void LSPServer::onPDLLViewOutput(
const PDLLViewOutputParams ¶ms,
Callback<std::optional<PDLLViewOutputResult>> reply) { … }
LogicalResult mlir::lsp::runPdllLSPServer(PDLLServer &server,
JSONTransport &transport) { … }