Skip to content

Commit 7e41b50

Browse files
committed
T826-026 New Visit method has been added
Contains Token as a parameter for handlers that need it.
1 parent 39b4b9f commit 7e41b50

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

source/protocol/lsp-generic_notifications.adb

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
with VSS.Strings.Conversions;
1919

20-
with LSP.Types;
2120
with LSP.Messages.Common_Writers;
2221

2322
package body LSP.Generic_Notifications is
@@ -81,6 +80,18 @@ package body LSP.Generic_Notifications is
8180
raise Program_Error;
8281
end Visit;
8382

83+
-----------
84+
-- Visit --
85+
-----------
86+
87+
procedure Visit
88+
(Self : Notification;
89+
Token : LSP.Types.LSP_Number_Or_String;
90+
Handler : access Visitor) is
91+
begin
92+
raise Program_Error;
93+
end Visit;
94+
8495
-----------
8596
-- Write --
8697
-----------

source/protocol/lsp-generic_notifications.ads

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ with Ada.Streams;
2222

2323
with LSP.JSON_Streams;
2424
with LSP.Messages;
25+
with LSP.Types;
2526

2627
generic
2728
type Base_Message is abstract new LSP.Messages.NotificationMessage
@@ -45,6 +46,11 @@ package LSP.Generic_Notifications is
4546
(Self : Notification;
4647
Handler : access Visitor);
4748

49+
procedure Visit
50+
(Self : Notification;
51+
Token : LSP.Types.LSP_Number_Or_String;
52+
Handler : access Visitor);
53+
4854
procedure Read
4955
(S : access Ada.Streams.Root_Stream_Type'Class;
5056
V : out Notification);

0 commit comments

Comments
 (0)