Skip to content

Commit 11cd2d4

Browse files
committed
Remove unused code of enumeration literals processing.
1 parent bbd045a commit 11cd2d4

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

source/ada/lsp-ada_documentation.adb

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ package body LSP.Ada_Documentation is
3333
use Libadalang.Analysis;
3434
use Libadalang.Common;
3535

36-
function Get_Decl_Text
37-
(BD : Libadalang.Analysis.Basic_Decl) return VSS.Strings.Virtual_String;
38-
-- Return the code associated with the given declaration, in a formatted
39-
-- way.
40-
4136
function Get_Hover_Text_For_Node
4237
(Node : Libadalang.Analysis.Ada_Node'Class)
4338
return VSS.String_Vectors.Virtual_String_Vector;
@@ -116,27 +111,6 @@ package body LSP.Ada_Documentation is
116111
VSS.Strings.LF;
117112
-- Line terminator to be used to generate replies. It is fixed to LF now.
118113

119-
-------------------
120-
-- Get_Decl_Text --
121-
-------------------
122-
123-
function Get_Decl_Text
124-
(BD : Libadalang.Analysis.Basic_Decl) return VSS.Strings.Virtual_String
125-
is
126-
Result : VSS.Strings.Virtual_String;
127-
begin
128-
-- If the basic declaration is an enum literal, display the whole
129-
-- enumeration type declaration instead.
130-
if BD.Kind in Ada_Enum_Literal_Decl then
131-
Result := Get_Hover_Text
132-
(BD.As_Enum_Literal_Decl.P_Enum_Type.As_Basic_Decl);
133-
else
134-
Result := Get_Hover_Text (BD);
135-
end if;
136-
137-
return Result;
138-
end Get_Decl_Text;
139-
140114
--------------------
141115
-- Get_Hover_Text --
142116
--------------------
@@ -547,7 +521,7 @@ package body LSP.Ada_Documentation is
547521
then
548522
-- For subprograms additional information is added, use old code to
549523
-- obtain it yet.
550-
Decl_Text := Get_Decl_Text (BD);
524+
Decl_Text := Get_Hover_Text (BD);
551525
end if;
552526

553527
Loc_Text := LSP.Lal_Utils.Node_Location_Image (BD);

0 commit comments

Comments
 (0)