11-- ----------------------------------------------------------------------------
22-- Language Server Protocol --
33-- --
4- -- Copyright (C) 2018-2021 , AdaCore --
4+ -- Copyright (C) 2018-2023 , AdaCore --
55-- --
66-- This is free software; you can redistribute it and/or modify it under --
77-- terms of the GNU General Public License as published by the Free Soft- --
@@ -21,9 +21,9 @@ with Ada.Tags.Generic_Dispatching_Constructor;
2121
2222with Interfaces ;
2323
24- with VSS.JSON.Pull_Readers ;
25- with VSS.Strings.Conversions ;
2624with VSS.JSON.Pull_Readers.Look_Ahead ;
25+ with VSS.JSON.Streams ;
26+ with VSS.Strings.Conversions ;
2727
2828with LSP.JSON_Streams ;
2929with LSP.Message_IO ;
@@ -2892,13 +2892,13 @@ package body LSP.Messages is
28922892 JS : LSP.JSON_Streams.JSON_Stream'Class renames
28932893 LSP.JSON_Streams.JSON_Stream'Class (S.all );
28942894 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 =>
28972897 V := (Is_String => True,
28982898 value => JS.R.String_Value);
28992899
29002900 JS.R.Read_Next;
2901- when VSS.JSON.Pull_Readers .Start_Object =>
2901+ when VSS.JSON.Streams .Start_Object =>
29022902 V := (Is_String => False, others => <>);
29032903
29042904 JS.R.Read_Next;
@@ -2991,20 +2991,20 @@ package body LSP.Messages is
29912991 JS : LSP.JSON_Streams.JSON_Stream'Class renames
29922992 LSP.JSON_Streams.JSON_Stream'Class (S.all );
29932993 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 =>
29962996
29972997 V := (Is_MarkupContent => False,
29982998 Vector => <>);
29992999 V.Vector.Append
30003000 (MarkedString'(Is_String => True,
30013001 value => JS.R.String_Value));
30023002 JS.R.Read_Next;
3003- when VSS.JSON.Pull_Readers .Start_Array =>
3003+ when VSS.JSON.Streams .Start_Array =>
30043004 V := (Is_MarkupContent => False,
30053005 Vector => <>);
30063006 MarkedString_Vector'Read (S, V.Vector);
3007- when VSS.JSON.Pull_Readers .Start_Object =>
3007+ when VSS.JSON.Streams .Start_Object =>
30083008 Read_Object (JS);
30093009 when others =>
30103010 JS.Skip_Value;
@@ -3022,14 +3022,14 @@ package body LSP.Messages is
30223022 JS : LSP.JSON_Streams.JSON_Stream'Class renames
30233023 LSP.JSON_Streams.JSON_Stream'Class (S.all );
30243024 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 =>
30273027 V := (False, False);
30283028 JS.R.Read_Next;
3029- when VSS.JSON.Pull_Readers .Start_Object =>
3029+ when VSS.JSON.Streams .Start_Object =>
30303030 V := (True, False, others => <>);
30313031 TextDocumentSyncOptions'Read (S, V.Options);
3032- when VSS.JSON.Pull_Readers .Number_Value =>
3032+ when VSS.JSON.Streams .Number_Value =>
30333033 V := (True, True, others => <>);
30343034 TextDocumentSyncKind'Read (S, V.Value);
30353035 when others =>
@@ -3048,12 +3048,12 @@ package body LSP.Messages is
30483048 JS : LSP.JSON_Streams.JSON_Stream'Class renames
30493049 LSP.JSON_Streams.JSON_Stream'Class (S.all );
30503050 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 =>
30533053 V := (Is_String => True,
30543054 String => JS.R.String_Value);
30553055 JS.R.Read_Next;
3056- when VSS.JSON.Pull_Readers .Start_Array =>
3056+ when VSS.JSON.Streams .Start_Array =>
30573057 JS.R.Read_Next;
30583058 UTF_16_Index'Read (S, V.From);
30593059 UTF_16_Index'Read (S, V.Till);
@@ -3075,12 +3075,12 @@ package body LSP.Messages is
30753075 JS : LSP.JSON_Streams.JSON_Stream'Class renames
30763076 LSP.JSON_Streams.JSON_Stream'Class (S.all );
30773077 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 =>
30803080 V := (Is_Boolean => True,
30813081 Bool => JS.R.Boolean_Value);
30823082 JS.R.Read_Next;
3083- when VSS.JSON.Pull_Readers .Start_Object =>
3083+ when VSS.JSON.Streams .Start_Object =>
30843084 V := (Is_Boolean => False,
30853085 Options => (Is_Set => True, Value => <>));
30863086
@@ -3103,13 +3103,13 @@ package body LSP.Messages is
31033103 JS : LSP.JSON_Streams.JSON_Stream'Class renames
31043104 LSP.JSON_Streams.JSON_Stream'Class (S.all );
31053105 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 =>
31083108 V := (Is_String => True,
31093109 String => JS.R.String_Value);
31103110 JS.R.Read_Next;
31113111
3112- when VSS.JSON.Pull_Readers .Start_Object =>
3112+ when VSS.JSON.Streams .Start_Object =>
31133113 V := (Is_String => False, Content => <>);
31143114 MarkupContent'Read (S, V.Content);
31153115 when others =>
@@ -3344,8 +3344,8 @@ package body LSP.Messages is
33443344 Result : Integer;
33453345 Mask : Integer := 4 ;
33463346 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 =>
33493349 Result := Integer (JS.R.Number_Value.Integer_Value);
33503350
33513351 for J in reverse WatchKind loop
0 commit comments