Skip to content

Commit d1c570b

Browse files
committed
Fix LSP_Gen to have working loggers.
Refs #1290
1 parent 48e4bbc commit d1c570b

File tree

6 files changed

+14
-7
lines changed

6 files changed

+14
-7
lines changed

source/lsp_gen/lsp_gen-configurations.adb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
with VSS.JSON.Pull_Readers.JSON5;
1919
with VSS.Strings.Character_Iterators;
2020
with VSS.Text_Streams.File_Input;
21+
with VSS.Transformers.Casing; use VSS.Transformers.Casing;
2122

2223
package body LSP_Gen.Configurations is
2324

@@ -159,7 +160,7 @@ package body LSP_Gen.Configurations is
159160
-- Turn the first character too uppercase
160161
declare
161162
Upper : constant VSS.Strings.Virtual_String :=
162-
Result.To_Simple_Uppercase;
163+
To_Simple_Uppercase.Transform (Result);
163164
Left : VSS.Strings.Character_Iterators.Character_Iterator :=
164165
Upper.At_First_Character;
165166
begin

source/lsp_gen/lsp_gen-mappings.adb

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

1818
with VSS.Characters;
1919
with VSS.Strings.Cursors.Iterators.Characters;
20+
with VSS.Transformers.Casing; use VSS.Transformers.Casing;
2021

2122
with LSP_Gen.String_Sets;
2223

@@ -158,7 +159,9 @@ package body LSP_Gen.Mappings is
158159
return VSS.Strings.Virtual_String
159160
is
160161
use type VSS.Characters.Virtual_Character;
161-
Keyword : constant VSS.Strings.Virtual_String := Text.To_Lowercase;
162+
163+
Keyword : constant VSS.Strings.Virtual_String :=
164+
To_Lowercase.Transform (Text);
162165
Result : VSS.Strings.Virtual_String;
163166
begin
164167
if Keywords.Contains (Keyword) then

source/lsp_gen/lsp_gen-notifications.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ package body LSP_Gen.Notifications is
156156

157157
Put_Line (")");
158158
Put_Line ("is");
159-
Put_Line ("Ok : Boolean := False;");
159+
Put_Line ("Ok : Boolean := True;");
160160
Put_Line ("begin");
161161
Put ("Self.Output.Put (""'");
162162
Put (J);

source/lsp_gen/lsp_gen-puts.adb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ with VSS.Characters;
2222
with VSS.Strings.Conversions;
2323
with VSS.Strings.Cursors.Iterators.Characters;
2424
with VSS.Strings.Hash;
25+
with VSS.Transformers.Casing; use VSS.Transformers.Casing;
2526

2627
package body LSP_Gen.Puts is
2728

@@ -82,7 +83,9 @@ package body LSP_Gen.Puts is
8283

8384
procedure Put_Id (Id : VSS.Strings.Virtual_String) is
8485
use type VSS.Characters.Virtual_Character;
85-
Keyword : constant VSS.Strings.Virtual_String := Id.To_Lowercase;
86+
87+
Keyword : constant VSS.Strings.Virtual_String :=
88+
To_Lowercase.Transform (Id);
8689
begin
8790
if Keywords.Contains (Keyword) then
8891
if Id.At_First_Character.Element =

source/lsp_gen/lsp_gen-requests.adb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ package body LSP_Gen.Requests is
155155

156156
Put_Line (")");
157157
Put_Line ("is");
158-
Put_Line ("Ok : Boolean := False;");
158+
Put_Line ("Ok : Boolean := True;");
159159
Put_Line ("begin");
160160
Put ("Self.Output.Put (""'");
161161
Put (J);

source/lsp_gen/lsp_gen-responses.adb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ package body LSP_Gen.Responses is
179179

180180
Put_Line (")");
181181
Put_Line ("is");
182-
Put_Line ("Ok : Boolean := False;");
182+
Put_Line ("Ok : Boolean := True;");
183183
Put_Line ("begin");
184184
Put ("Self.Output.Put (""'");
185185
Put (J);
@@ -203,7 +203,7 @@ package body LSP_Gen.Responses is
203203
Put_Line ("Id : LSP.Structures.Integer_Or_Virtual_String;");
204204
Put_Line ("Value : LSP.Errors.ResponseError)");
205205
Put_Line ("is");
206-
Put_Line ("Ok : Boolean := False;");
206+
Put_Line ("Ok : Boolean := True;");
207207
Put_Line ("begin");
208208
Put ("Self.Output.Put (""'Error response'"", Ok);");
209209
Put_Line ("Self.Put_Id (Id, Ok);");

0 commit comments

Comments
 (0)