Skip to content

Commit a46e980

Browse files
committed
Regenerate sources after changes in the lsp_gen.
Refs #1170
1 parent c75fe6e commit a46e980

File tree

4 files changed

+127
-215
lines changed

4 files changed

+127
-215
lines changed

source/lsp_3.17/generated/lsp-enumerations.ads

Lines changed: 80 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
-- DON'T EDIT THIS FILE! It was generated from metaModel.json.
77
--
88

9+
with VSS.Strings;
10+
911
package LSP.Enumerations is
1012
pragma Preelaborate;
1113

@@ -21,21 +23,19 @@ package LSP.Enumerations is
2123

2224
type AlsVisibility is (Als_Public, Als_Protected, Als_Private);
2325

24-
type CodeActionKind is
25-
(Empty, QuickFix, Refactor, RefactorExtract, RefactorInline,
26-
RefactorRewrite, Source, SourceOrganizeImports, SourceFixAll);
26+
type CodeActionKind is new VSS.Strings.Virtual_String with null record;
2727
-- A set of predefined code action kinds
28-
--
29-
-- @value Empty
28+
29+
function Empty return CodeActionKind is ("");
3030
-- Empty kind.
31-
--
32-
-- @value QuickFix
31+
32+
function QuickFix return CodeActionKind is ("quickfix");
3333
-- Base kind for quickfix actions: 'quickfix'
34-
--
35-
-- @value Refactor
34+
35+
function Refactor return CodeActionKind is ("refactor");
3636
-- Base kind for refactoring actions: 'refactor'
37-
--
38-
-- @value RefactorExtract
37+
38+
function RefactorExtract return CodeActionKind is ("refactor.extract");
3939
-- Base kind for refactoring extraction actions: 'refactor.extract'
4040
--
4141
-- Example extract actions:
@@ -44,8 +44,8 @@ package LSP.Enumerations is
4444
-- - Extract function
4545
-- - Extract variable
4646
-- - Extract interface from class - ...
47-
--
48-
-- @value RefactorInline
47+
48+
function RefactorInline return CodeActionKind is ("refactor.inline");
4949
-- Base kind for refactoring inline actions: 'refactor.inline'
5050
--
5151
-- Example inline actions:
@@ -54,25 +54,26 @@ package LSP.Enumerations is
5454
-- - Inline variable
5555
-- - Inline constant
5656
-- - ...
57-
--
58-
-- @value RefactorRewrite
57+
58+
function RefactorRewrite return CodeActionKind is ("refactor.rewrite");
5959
-- Base kind for refactoring rewrite actions: 'refactor.rewrite'
6060
--
6161
-- Example rewrite actions:
6262
--
6363
-- - Convert JavaScript function to class - Add or remove parameter -
6464
-- Encapsulate field - Make method static - Move method to base class - ...
65-
--
66-
-- @value Source
65+
66+
function Source return CodeActionKind is ("source");
6767
-- Base kind for source actions: `source`
6868
--
6969
-- Source code actions apply to the entire file.
70-
--
71-
-- @value SourceOrganizeImports
70+
71+
function SourceOrganizeImports return CodeActionKind is
72+
("source.organizeImports");
7273
-- Base kind for an organize imports source action:
7374
-- `source.organizeImports`
74-
--
75-
-- @value SourceFixAll
75+
76+
function SourceFixAll return CodeActionKind is ("source.fixAll");
7677
-- Base kind for auto-fix source actions: `source.fixAll`.
7778
--
7879
-- Fix all actions automatically fix errors that have a clear fix that
@@ -170,34 +171,43 @@ package LSP.Enumerations is
170171
-- @value Write
171172
-- Write-access of a symbol, like writing to a variable.
172173

173-
type ErrorCodes is
174-
(ParseError, InvalidRequest, MethodNotFound, InvalidParams, InternalError,
175-
jsonrpcReservedErrorRangeStart, serverErrorStart, ServerNotInitialized,
176-
UnknownErrorCode, jsonrpcReservedErrorRangeEnd, serverErrorEnd);
174+
type ErrorCodes is new Integer;
177175
-- Predefined error codes.
178-
--
179-
-- @value jsonrpcReservedErrorRangeStart
176+
177+
function ParseError return ErrorCodes is (-32_700);
178+
179+
function InvalidRequest return ErrorCodes is (-32_600);
180+
181+
function MethodNotFound return ErrorCodes is (-32_601);
182+
183+
function InvalidParams return ErrorCodes is (-32_602);
184+
185+
function InternalError return ErrorCodes is (-32_603);
186+
187+
function jsonrpcReservedErrorRangeStart return ErrorCodes is (-32_099);
180188
-- This is the start range of JSON RPC reserved error codes. It doesn't
181189
-- denote a real error code. No application error codes should be defined
182190
-- between the start and end range. For backwards compatibility the
183191
-- `ServerNotInitialized` and the `UnknownErrorCode` are left in the range.
184192
--
185193
-- @since 3.16.0
186-
--
187-
-- @value serverErrorStart
194+
195+
function serverErrorStart return ErrorCodes is (-32_099);
188196
-- @deprecated use jsonrpcReservedErrorRangeStart */
189-
--
190-
-- @value ServerNotInitialized
197+
198+
function ServerNotInitialized return ErrorCodes is (-32_002);
191199
-- Error code indicating that a server received a notification or request
192200
-- before the server has received the `initialize` request.
193-
--
194-
-- @value jsonrpcReservedErrorRangeEnd
201+
202+
function UnknownErrorCode return ErrorCodes is (-32_001);
203+
204+
function jsonrpcReservedErrorRangeEnd return ErrorCodes is (-32_000);
195205
-- This is the end range of JSON RPC reserved error codes. It doesn't
196206
-- denote a real error code.
197207
--
198208
-- @since 3.16.0
199-
--
200-
-- @value serverErrorEnd
209+
210+
function serverErrorEnd return ErrorCodes is (-32_000);
201211
-- @deprecated use jsonrpcReservedErrorRangeEnd */
202212

203213
type FailureHandlingKind is
@@ -245,16 +255,16 @@ package LSP.Enumerations is
245255
-- @value folder
246256
-- The pattern matches a folder only.
247257

248-
type FoldingRangeKind is (Comment, Imports, Region);
258+
type FoldingRangeKind is new VSS.Strings.Virtual_String with null record;
249259
-- A set of predefined range kinds.
250-
--
251-
-- @value Comment
260+
261+
function Comment return FoldingRangeKind is ("comment");
252262
-- Folding range for a comment
253-
--
254-
-- @value Imports
263+
264+
function Imports return FoldingRangeKind is ("imports");
255265
-- Folding range for an import or include
256-
--
257-
-- @value Region
266+
267+
function Region return FoldingRangeKind is ("region");
258268
-- Folding range for a region (e.g. `#region`)
259269

260270
type InlayHintKind is (A_Type, Parameter);
@@ -307,42 +317,40 @@ package LSP.Enumerations is
307317
-- line completion item is indented using 2 tabs and all following lines
308318
-- inserted will be indented using 2 tabs as well.
309319

310-
type LSPErrorCodes is
311-
(lspReservedErrorRangeStart, RequestFailed, ServerCancelled,
312-
ContentModified, RequestCancelled, lspReservedErrorRangeEnd);
313-
--
314-
-- @value lspReservedErrorRangeStart
320+
type LSPErrorCodes is new Integer;
321+
322+
function lspReservedErrorRangeStart return LSPErrorCodes is (-32_899);
315323
-- This is the start range of LSP reserved error codes. It doesn't denote a
316324
-- real error code.
317325
--
318326
-- @since 3.16.0
319-
--
320-
-- @value RequestFailed
327+
328+
function RequestFailed return LSPErrorCodes is (-32_803);
321329
-- A request failed but it was syntactically correct, e.g the method
322330
-- name was known and the parameters were valid. The error message
323331
-- should contain human readable information about why the request failed.
324332
--
325333
-- @since 3.17.0
326-
--
327-
-- @value ServerCancelled
334+
335+
function ServerCancelled return LSPErrorCodes is (-32_802);
328336
-- The server cancelled the request. This error code should only be used
329337
-- for requests that explicitly support being server cancellable.
330338
--
331339
-- @since 3.17.0
332-
--
333-
-- @value ContentModified
340+
341+
function ContentModified return LSPErrorCodes is (-32_801);
334342
-- The server detected that the content of a document got modified outside
335343
-- normal conditions. A server should NOT send this error code if it
336344
-- detects a content change in it unprocessed messages. The result
337345
-- even computed on an older state might still be useful for the client.
338346
--
339347
-- If a client decides that a result is not of any use anymore the client
340348
-- should cancel the request.
341-
--
342-
-- @value RequestCancelled
349+
350+
function RequestCancelled return LSPErrorCodes is (-32_800);
343351
-- The client has canceled a request and a server as detected the cancel.
344-
--
345-
-- @value lspReservedErrorRangeEnd
352+
353+
function lspReservedErrorRangeEnd return LSPErrorCodes is (-32_800);
346354
-- This is the end range of LSP reserved error codes. It doesn't denote a
347355
-- real error code.
348356
--
@@ -402,20 +410,21 @@ package LSP.Enumerations is
402410
-- @value Code
403411
-- A code-cell is source code.
404412

405-
type PositionEncodingKind is (UTF8, UTF16, UTF32);
413+
type PositionEncodingKind is
414+
new VSS.Strings.Virtual_String with null record;
406415
-- A set of predefined position encoding kinds.
407416
--
408417
-- @since 3.17.0
409-
--
410-
-- @value UTF8
418+
419+
function UTF8 return PositionEncodingKind is ("utf-8");
411420
-- Character offsets count UTF-8 code units.
412-
--
413-
-- @value UTF16
421+
422+
function UTF16 return PositionEncodingKind is ("utf-16");
414423
-- Character offsets count UTF-16 code units.
415424
--
416425
-- This is the default and must always be supported by servers
417-
--
418-
-- @value UTF32
426+
427+
function UTF32 return PositionEncodingKind is ("utf-32");
419428
-- Character offsets count UTF-32 code units.
420429
--
421430
-- Implementation note: these are the same as Unicode code points, so
@@ -556,15 +565,15 @@ package LSP.Enumerations is
556565
-- @value global
557566
-- The moniker is globally unique
558567

559-
type WatchKind is (Create, Change, Delete);
560-
--
561-
-- @value Create
568+
type WatchKind is mod 2**16;
569+
570+
function Create return WatchKind is (1);
562571
-- Interested in create events.
563-
--
564-
-- @value Change
572+
573+
function Change return WatchKind is (2);
565574
-- Interested in change events
566-
--
567-
-- @value Delete
575+
576+
function Delete return WatchKind is (4);
568577
-- Interested in delete events
569578

570579
end LSP.Enumerations;

source/lsp_3.17/generated/lsp-inputs.adb

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1787,10 +1787,10 @@ package body LSP.Inputs is
17871787
Set : LSP.Structures.FoldingRangeKind_Set renames Value;
17881788
Value : LSP.Enumerations.FoldingRangeKind;
17891789
begin
1790-
Set := (others => False);
1790+
Set.Clear;
17911791
while not Handler.Is_End_Array loop
17921792
Read_FoldingRangeKind (Handler, Value);
1793-
Set (Value) := True;
1793+
Set.Append (Value);
17941794
end loop;
17951795
end;
17961796

@@ -2073,9 +2073,7 @@ package body LSP.Inputs is
20732073
(Handler : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
20742074
Value : out LSP.Enumerations.CodeActionKind) is
20752075
begin
2076-
Value :=
2077-
LSP.Enumerations.CodeActionKind'Val
2078-
(CodeActionKind_Map.Get_Index (Handler.String_Value) - 1);
2076+
Value := (Handler.String_Value with null record);
20792077
Handler.Read_Next;
20802078
end Read_CodeActionKind;
20812079

@@ -6908,10 +6906,10 @@ package body LSP.Inputs is
69086906
Set : LSP.Structures.PositionEncodingKind_Set renames Value;
69096907
Value : LSP.Enumerations.PositionEncodingKind;
69106908
begin
6911-
Set := (others => False);
6909+
Set.Clear;
69126910
while not Handler.Is_End_Array loop
69136911
Read_PositionEncodingKind (Handler, Value);
6914-
Set (Value) := True;
6912+
Set.Append (Value);
69156913
end loop;
69166914
end;
69176915

@@ -8340,10 +8338,10 @@ package body LSP.Inputs is
83408338
Set : LSP.Structures.CodeActionKind_Set renames Value;
83418339
Value : LSP.Enumerations.CodeActionKind;
83428340
begin
8343-
Set := (others => False);
8341+
Set.Clear;
83448342
while not Handler.Is_End_Array loop
83458343
Read_CodeActionKind (Handler, Value);
8346-
Set (Value) := True;
8344+
Set.Append (Value);
83478345
end loop;
83488346
end;
83498347

@@ -10439,9 +10437,7 @@ package body LSP.Inputs is
1043910437
(Handler : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
1044010438
Value : out LSP.Enumerations.WatchKind) is
1044110439
begin
10442-
Value :=
10443-
LSP.Enumerations.WatchKind'Val
10444-
(Handler.Number_Value.Integer_Value - 1);
10440+
Value := LSP.Enumerations.WatchKind (Handler.Number_Value.Integer_Value);
1044510441
Handler.Read_Next;
1044610442
end Read_WatchKind;
1044710443

@@ -10968,8 +10964,7 @@ package body LSP.Inputs is
1096810964
Value : out LSP.Enumerations.ErrorCodes) is
1096910965
begin
1097010966
Value :=
10971-
LSP.Enumerations.ErrorCodes'Val
10972-
(Handler.Number_Value.Integer_Value + 32_700);
10967+
LSP.Enumerations.ErrorCodes (Handler.Number_Value.Integer_Value);
1097310968
Handler.Read_Next;
1097410969
end Read_ErrorCodes;
1097510970

@@ -13591,9 +13586,7 @@ package body LSP.Inputs is
1359113586
(Handler : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
1359213587
Value : out LSP.Enumerations.PositionEncodingKind) is
1359313588
begin
13594-
Value :=
13595-
LSP.Enumerations.PositionEncodingKind'Val
13596-
(PositionEncodingKind_Map.Get_Index (Handler.String_Value) - 1);
13589+
Value := (Handler.String_Value with null record);
1359713590
Handler.Read_Next;
1359813591
end Read_PositionEncodingKind;
1359913592

@@ -14969,9 +14962,7 @@ package body LSP.Inputs is
1496914962
(Handler : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
1497014963
Value : out LSP.Enumerations.FoldingRangeKind) is
1497114964
begin
14972-
Value :=
14973-
LSP.Enumerations.FoldingRangeKind'Val
14974-
(FoldingRangeKind_Map.Get_Index (Handler.String_Value) - 1);
14965+
Value := (Handler.String_Value with null record);
1497514966
Handler.Read_Next;
1497614967
end Read_FoldingRangeKind;
1497714968

@@ -24145,8 +24136,7 @@ package body LSP.Inputs is
2414524136
Value : out LSP.Enumerations.LSPErrorCodes) is
2414624137
begin
2414724138
Value :=
24148-
LSP.Enumerations.LSPErrorCodes'Val
24149-
(Handler.Number_Value.Integer_Value + 32_899);
24139+
LSP.Enumerations.LSPErrorCodes (Handler.Number_Value.Integer_Value);
2415024140
Handler.Read_Next;
2415124141
end Read_LSPErrorCodes;
2415224142

0 commit comments

Comments
 (0)