66-- DON'T EDIT THIS FILE! It was generated from metaModel.json.
77--
88
9+ with VSS.Strings ;
10+
911package 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
570579end LSP.Enumerations ;
0 commit comments