1
1
-- ----------------------------------------------------------------------------
2
2
-- Language Server Protocol --
3
3
-- --
4
- -- Copyright (C) 2018-2021 , AdaCore --
4
+ -- Copyright (C) 2018-2023 , AdaCore --
5
5
-- --
6
6
-- This is free software; you can redistribute it and/or modify it under --
7
7
-- terms of the GNU General Public License as published by the Free Soft- --
@@ -21,9 +21,9 @@ with Ada.Tags.Generic_Dispatching_Constructor;
21
21
22
22
with Interfaces ;
23
23
24
- with VSS.JSON.Pull_Readers ;
25
- with VSS.Strings.Conversions ;
26
24
with VSS.JSON.Pull_Readers.Look_Ahead ;
25
+ with VSS.JSON.Streams ;
26
+ with VSS.Strings.Conversions ;
27
27
28
28
with LSP.JSON_Streams ;
29
29
with LSP.Message_IO ;
@@ -2892,13 +2892,13 @@ package body LSP.Messages is
2892
2892
JS : LSP.JSON_Streams.JSON_Stream'Class renames
2893
2893
LSP.JSON_Streams.JSON_Stream'Class (S.all );
2894
2894
begin
2895
- case JS.R.Event_Kind is
2896
- when VSS.JSON.Pull_Readers .String_Value =>
2895
+ case JS.R.Element_Kind is
2896
+ when VSS.JSON.Streams .String_Value =>
2897
2897
V := (Is_String => True,
2898
2898
value => JS.R.String_Value);
2899
2899
2900
2900
JS.R.Read_Next;
2901
- when VSS.JSON.Pull_Readers .Start_Object =>
2901
+ when VSS.JSON.Streams .Start_Object =>
2902
2902
V := (Is_String => False, others => <>);
2903
2903
2904
2904
JS.R.Read_Next;
@@ -2991,20 +2991,20 @@ package body LSP.Messages is
2991
2991
JS : LSP.JSON_Streams.JSON_Stream'Class renames
2992
2992
LSP.JSON_Streams.JSON_Stream'Class (S.all );
2993
2993
begin
2994
- case JS.R.Event_Kind is
2995
- when VSS.JSON.Pull_Readers .String_Value =>
2994
+ case JS.R.Element_Kind is
2995
+ when VSS.JSON.Streams .String_Value =>
2996
2996
2997
2997
V := (Is_MarkupContent => False,
2998
2998
Vector => <>);
2999
2999
V.Vector.Append
3000
3000
(MarkedString'(Is_String => True,
3001
3001
value => JS.R.String_Value));
3002
3002
JS.R.Read_Next;
3003
- when VSS.JSON.Pull_Readers .Start_Array =>
3003
+ when VSS.JSON.Streams .Start_Array =>
3004
3004
V := (Is_MarkupContent => False,
3005
3005
Vector => <>);
3006
3006
MarkedString_Vector'Read (S, V.Vector);
3007
- when VSS.JSON.Pull_Readers .Start_Object =>
3007
+ when VSS.JSON.Streams .Start_Object =>
3008
3008
Read_Object (JS);
3009
3009
when others =>
3010
3010
JS.Skip_Value;
@@ -3022,14 +3022,14 @@ package body LSP.Messages is
3022
3022
JS : LSP.JSON_Streams.JSON_Stream'Class renames
3023
3023
LSP.JSON_Streams.JSON_Stream'Class (S.all );
3024
3024
begin
3025
- case JS.R.Event_Kind is
3026
- when VSS.JSON.Pull_Readers .Null_Value =>
3025
+ case JS.R.Element_Kind is
3026
+ when VSS.JSON.Streams .Null_Value =>
3027
3027
V := (False, False);
3028
3028
JS.R.Read_Next;
3029
- when VSS.JSON.Pull_Readers .Start_Object =>
3029
+ when VSS.JSON.Streams .Start_Object =>
3030
3030
V := (True, False, others => <>);
3031
3031
TextDocumentSyncOptions'Read (S, V.Options);
3032
- when VSS.JSON.Pull_Readers .Number_Value =>
3032
+ when VSS.JSON.Streams .Number_Value =>
3033
3033
V := (True, True, others => <>);
3034
3034
TextDocumentSyncKind'Read (S, V.Value);
3035
3035
when others =>
@@ -3048,12 +3048,12 @@ package body LSP.Messages is
3048
3048
JS : LSP.JSON_Streams.JSON_Stream'Class renames
3049
3049
LSP.JSON_Streams.JSON_Stream'Class (S.all );
3050
3050
begin
3051
- case JS.R.Event_Kind is
3052
- when VSS.JSON.Pull_Readers .String_Value =>
3051
+ case JS.R.Element_Kind is
3052
+ when VSS.JSON.Streams .String_Value =>
3053
3053
V := (Is_String => True,
3054
3054
String => JS.R.String_Value);
3055
3055
JS.R.Read_Next;
3056
- when VSS.JSON.Pull_Readers .Start_Array =>
3056
+ when VSS.JSON.Streams .Start_Array =>
3057
3057
JS.R.Read_Next;
3058
3058
UTF_16_Index'Read (S, V.From);
3059
3059
UTF_16_Index'Read (S, V.Till);
@@ -3075,12 +3075,12 @@ package body LSP.Messages is
3075
3075
JS : LSP.JSON_Streams.JSON_Stream'Class renames
3076
3076
LSP.JSON_Streams.JSON_Stream'Class (S.all );
3077
3077
begin
3078
- case JS.R.Event_Kind is
3079
- when VSS.JSON.Pull_Readers .Boolean_Value =>
3078
+ case JS.R.Element_Kind is
3079
+ when VSS.JSON.Streams .Boolean_Value =>
3080
3080
V := (Is_Boolean => True,
3081
3081
Bool => JS.R.Boolean_Value);
3082
3082
JS.R.Read_Next;
3083
- when VSS.JSON.Pull_Readers .Start_Object =>
3083
+ when VSS.JSON.Streams .Start_Object =>
3084
3084
V := (Is_Boolean => False,
3085
3085
Options => (Is_Set => True, Value => <>));
3086
3086
@@ -3103,13 +3103,13 @@ package body LSP.Messages is
3103
3103
JS : LSP.JSON_Streams.JSON_Stream'Class renames
3104
3104
LSP.JSON_Streams.JSON_Stream'Class (S.all );
3105
3105
begin
3106
- case JS.R.Event_Kind is
3107
- when VSS.JSON.Pull_Readers .String_Value =>
3106
+ case JS.R.Element_Kind is
3107
+ when VSS.JSON.Streams .String_Value =>
3108
3108
V := (Is_String => True,
3109
3109
String => JS.R.String_Value);
3110
3110
JS.R.Read_Next;
3111
3111
3112
- when VSS.JSON.Pull_Readers .Start_Object =>
3112
+ when VSS.JSON.Streams .Start_Object =>
3113
3113
V := (Is_String => False, Content => <>);
3114
3114
MarkupContent'Read (S, V.Content);
3115
3115
when others =>
@@ -3344,8 +3344,8 @@ package body LSP.Messages is
3344
3344
Result : Integer;
3345
3345
Mask : Integer := 4 ;
3346
3346
begin
3347
- case JS.R.Event_Kind is
3348
- when VSS.JSON.Pull_Readers .Number_Value =>
3347
+ case JS.R.Element_Kind is
3348
+ when VSS.JSON.Streams .Number_Value =>
3349
3349
Result := Integer (JS.R.Number_Value.Integer_Value);
3350
3350
3351
3351
for J in reverse WatchKind loop
0 commit comments