File tree 4 files changed +9
-8
lines changed
include/mlir/Tools/lsp-server-support 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -95,10 +95,10 @@ class JSONTransport {
95
95
template <typename T>
96
96
using Callback = llvm::unique_function<void (llvm::Expected<T>)>;
97
97
98
- // / An OutgoingNotification <T> is a function used for outgoing notifications
99
- // / send to the client.
98
+ // / An OutgoingMessage <T> is a function used for outgoing requests or
99
+ // / notifications to send to the client.
100
100
template <typename T>
101
- using OutgoingNotification = llvm::unique_function<void (const T &)>;
101
+ using OutgoingMessage = llvm::unique_function<void (const T &)>;
102
102
103
103
// / A handler used to process the incoming transport messages.
104
104
class MessageHandler {
@@ -160,9 +160,10 @@ class MessageHandler {
160
160
};
161
161
}
162
162
163
- // / Create an OutgoingNotification object used for the given method.
163
+ // / Create an OutgoingMessage function that, when called, sends a notification
164
+ // / with the given method via the transport.
164
165
template <typename T>
165
- OutgoingNotification <T> outgoingNotification (llvm::StringLiteral method) {
166
+ OutgoingMessage <T> outgoingNotification (llvm::StringLiteral method) {
166
167
return [&, method](const T ¶ms) {
167
168
std::lock_guard<std::mutex> transportLock (transportOutputMutex);
168
169
Logger::info (" --> {0}" , method);
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ struct LSPServer {
91
91
92
92
// / An outgoing notification used to send diagnostics to the client when they
93
93
// / are ready to be processed.
94
- OutgoingNotification <PublishDiagnosticsParams> publishDiagnostics;
94
+ OutgoingMessage <PublishDiagnosticsParams> publishDiagnostics;
95
95
96
96
// / Used to indicate that the 'shutdown' request was received from the
97
97
// / Language Server client.
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ struct LSPServer {
104
104
105
105
// / An outgoing notification used to send diagnostics to the client when they
106
106
// / are ready to be processed.
107
- OutgoingNotification <PublishDiagnosticsParams> publishDiagnostics;
107
+ OutgoingMessage <PublishDiagnosticsParams> publishDiagnostics;
108
108
109
109
// / Used to indicate that the 'shutdown' request was received from the
110
110
// / Language Server client.
Original file line number Diff line number Diff line change @@ -72,7 +72,7 @@ struct LSPServer {
72
72
73
73
// / An outgoing notification used to send diagnostics to the client when they
74
74
// / are ready to be processed.
75
- OutgoingNotification <PublishDiagnosticsParams> publishDiagnostics;
75
+ OutgoingMessage <PublishDiagnosticsParams> publishDiagnostics;
76
76
77
77
// / Used to indicate that the 'shutdown' request was received from the
78
78
// / Language Server client.
You can’t perform that action at this time.
0 commit comments