Skip to content

Commit 297bd25

Browse files
committed
Ignore accept statement.
1 parent a07082d commit 297bd25

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

source/gnatdoc-comments-helpers.adb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -569,6 +569,14 @@ package body GNATdoc.Comments.Helpers is
569569
end if;
570570
end loop;
571571

572+
-- eng/libadalang/libadalang#1643: ignore accept statement, LAL returns
573+
-- it as most visible part.
574+
575+
if Most_Visible_Decl.Parent.Kind = Ada_Accept_Stmt_Body then
576+
Most_Visible_Index := @ - 1;
577+
Most_Visible_Decl := All_Decls (Most_Visible_Index);
578+
end if;
579+
572580
-- Exclude incomplete type declaration code snippets when documentation
573581
-- is requested for complete type declaration.
574582

0 commit comments

Comments
 (0)