MLIR
20.0.0git
|
A transport class that performs the JSON-RPC communication with the LSP client. More...
#include "mlir/Tools/lsp-server-support/Transport.h"
Public Member Functions | |
JSONTransport (std::FILE *in, raw_ostream &out, JSONStreamStyle style=JSONStreamStyle::Standard, bool prettyOutput=false) | |
void | notify (StringRef method, llvm::json::Value params) |
The following methods are used to send a message to the LSP client. More... | |
void | call (StringRef method, llvm::json::Value params, llvm::json::Value id) |
void | reply (llvm::json::Value id, llvm::Expected< llvm::json::Value > result) |
llvm::Error | run (MessageHandler &handler) |
Start executing the JSON-RPC transport. More... | |
A transport class that performs the JSON-RPC communication with the LSP client.
Definition at line 48 of file Transport.h.
|
inline |
Definition at line 50 of file Transport.h.
void JSONTransport::call | ( | StringRef | method, |
llvm::json::Value | params, | ||
llvm::json::Value | id | ||
) |
Definition at line 184 of file Transport.cpp.
Referenced by mlir::lsp::MessageHandler::outgoingRequest().
void JSONTransport::notify | ( | StringRef | method, |
llvm::json::Value | params | ||
) |
The following methods are used to send a message to the LSP client.
Definition at line 177 of file Transport.cpp.
Referenced by mlir::lsp::MessageHandler::outgoingNotification().
void JSONTransport::reply | ( | llvm::json::Value | id, |
llvm::Expected< llvm::json::Value > | result | ||
) |
Definition at line 193 of file Transport.cpp.
References encodeError().
llvm::Error JSONTransport::run | ( | MessageHandler & | handler | ) |
Start executing the JSON-RPC transport.
Definition at line 210 of file Transport.cpp.
References mlir::lsp::Logger::error(), mlir::query::parse(), and toString().
Referenced by mlir::lsp::runMlirLSPServer(), mlir::lsp::runPdllLSPServer(), and mlir::lsp::runTableGenLSPServer().