Skip to content

Commit 4aad380

Browse files
committed
Don't fallback to old implementation for enumeration literals.
... they are regular Ada functions too.
1 parent a6504a6 commit 4aad380

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

source/ada/lsp-lal_utils.adb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -806,13 +806,14 @@ package body LSP.Lal_Utils is
806806
is
807807
pragma Unreferenced (Trace);
808808

809-
Options : constant
809+
Options : constant
810810
GNATdoc.Comments.Options.Extractor_Options :=
811811
(Style => Style,
812812
Pattern => <>,
813813
Fallback => True);
814-
Decl_Lines : VSS.String_Vectors.Virtual_String_Vector;
815-
Doc_Lines : VSS.String_Vectors.Virtual_String_Vector;
814+
Decl_Lines : VSS.String_Vectors.Virtual_String_Vector;
815+
Doc_Lines : VSS.String_Vectors.Virtual_String_Vector;
816+
816817
begin
817818
-- Extract documentation with GNATdoc when supported.
818819

@@ -827,7 +828,8 @@ package body LSP.Lal_Utils is
827828

828829
-- If GNATdoc failed to compute the declaration text, use the old engine
829830
if Decl_Text.Is_Empty
830-
or else not BD.P_Subp_Spec_Or_Null.Is_Null
831+
or else (BD.Kind not in Ada_Enum_Literal_Decl
832+
and not BD.P_Subp_Spec_Or_Null.Is_Null)
831833
then
832834
-- For subprograms additional information is added, use old code to
833835
-- obtain it yet.

0 commit comments

Comments
 (0)