File tree Expand file tree Collapse file tree 4 files changed +83
-0
lines changed Expand file tree Collapse file tree 4 files changed +83
-0
lines changed Original file line number Diff line number Diff line change
1
+ --
2
+ -- Copyright (C) 2024, AdaCore
3
+ --
4
+
5
+ -- Consumer interface to process client->server messages created by the
6
+ -- Server_Message_Factory.
7
+
8
+ with LSP.Server_Messages ;
9
+
10
+ package LSP.Server_Message_Consumers
11
+ with Preelaborate
12
+ is
13
+
14
+ type Server_Message_Consumer is limited interface ;
15
+
16
+ not overriding procedure On_Message
17
+ (Self : in out Server_Message_Consumer;
18
+ Message : not null LSP.Server_Messages.Server_Message_Access)
19
+ is abstract ;
20
+ -- Process message. Implementation is responsible to release memory
21
+ -- occupied by message.
22
+
23
+ end LSP.Server_Message_Consumers ;
Original file line number Diff line number Diff line change
1
+ --
2
+ -- Copyright (C) 2024, AdaCore
3
+ --
4
+ -- SPDX-License-Identifier: Apache-2.0
5
+ --
6
+
7
+ with LSP.Server_Notification_Receivers ;
8
+ with LSP.Server_Request_Receivers ;
9
+ with LSP.Server_Response_Receivers ;
10
+
11
+ package LSP.Server_Message_Receivers is
12
+ pragma Preelaborate;
13
+
14
+ type Server_Message_Receiver is limited interface
15
+ and LSP.Server_Notification_Receivers.Server_Notification_Receiver
16
+ and LSP.Server_Request_Receivers.Server_Request_Receiver
17
+ and LSP.Server_Response_Receivers.Server_Response_Receiver;
18
+
19
+ end LSP.Server_Message_Receivers ;
Original file line number Diff line number Diff line change
1
+ --
2
+ -- Copyright (C) 2022-2023, AdaCore
3
+ --
4
+ -- SPDX-License-Identifier: Apache-2.0
5
+ --
6
+
7
+ package body LSP.Server_Responses.Errors is
8
+
9
+ -- -------------------------
10
+ -- Visit_Server_Receiver --
11
+ -- -------------------------
12
+
13
+ overriding procedure Visit_Server_Receiver
14
+ (Self : Response;
15
+ Value : in out
16
+ LSP.Server_Response_Receivers.Server_Response_Receiver'Class) is
17
+ begin
18
+ Value.On_Error_Response (Self.Id, Self.Error);
19
+ end Visit_Server_Receiver ;
20
+
21
+ end LSP.Server_Responses.Errors ;
Original file line number Diff line number Diff line change
1
+ --
2
+ -- Copyright (C) 2024, AdaCore
3
+ --
4
+ -- SPDX-License-Identifier: Apache-2.0
5
+ --
6
+
7
+ package LSP.Server_Responses.Errors
8
+ with Preelaborate
9
+ is
10
+
11
+ type Response is new LSP.Server_Responses.Server_Response with record
12
+ Error : LSP.Errors.ResponseError;
13
+ end record ;
14
+
15
+ overriding procedure Visit_Server_Receiver
16
+ (Self : Response;
17
+ Value : in out
18
+ LSP.Server_Response_Receivers.Server_Response_Receiver'Class);
19
+
20
+ end LSP.Server_Responses.Errors ;
You can’t perform that action at this time.
0 commit comments