File tree Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Expand file tree Collapse file tree 2 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ --
2+ -- Copyright (C) 2024, AdaCore
3+ --
4+ -- SPDX-License-Identifier: Apache-2.0
5+ --
6+
7+ with VSS.Strings ;
8+
9+ procedure LSP.Inputs .Read_ResponseError
10+ (Stream : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
11+ Value : out LSP.Errors.ResponseError)
12+ is
13+ use type VSS.Strings.Virtual_String;
14+
15+ begin
16+ pragma Assert (Stream.Is_Start_Object);
17+ Stream.Read_Next;
18+
19+ while not Stream.Is_End_Object loop
20+ pragma Assert (Stream.Is_Key_Name);
21+
22+ declare
23+ Key : constant VSS.Strings.Virtual_String := Stream.Key_Name;
24+
25+ begin
26+ Stream.Read_Next;
27+
28+ if Key = " code" then
29+ LSP.Inputs.Read_ErrorCodes (Stream, Value.code);
30+
31+ elsif Key = " message" then
32+ Value.message := Stream.String_Value;
33+ Stream.Read_Next;
34+
35+ else
36+ Stream.Skip_Current_Value;
37+ end if ;
38+ end ;
39+ end loop ;
40+
41+ Stream.Read_Next;
42+ end LSP.Inputs.Read_ResponseError ;
Original file line number Diff line number Diff line change 1+ --
2+ -- Copyright (C) 2024, AdaCore
3+ --
4+ -- SPDX-License-Identifier: Apache-2.0
5+ --
6+
7+ with VSS.JSON.Pull_Readers ;
8+ with LSP.Errors ;
9+
10+ procedure LSP.Inputs .Read_ResponseError
11+ (Stream : in out VSS.JSON.Pull_Readers.JSON_Pull_Reader'Class;
12+ Value : out LSP.Errors.ResponseError);
You can’t perform that action at this time.
0 commit comments