diff options
Diffstat (limited to 'src/vhdl')
-rw-r--r-- | src/vhdl/vhdl-comments.adb | 4 | ||||
-rw-r--r-- | src/vhdl/vhdl-parse.adb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/vhdl/vhdl-comments.adb b/src/vhdl/vhdl-comments.adb index d8c64610e..16587c843 100644 --- a/src/vhdl/vhdl-comments.adb +++ b/src/vhdl/vhdl-comments.adb @@ -37,11 +37,9 @@ package body Vhdl.Comments is procedure Gather_Comments_Line (N : Iir) is Coord : Source_Coord_Type; - Rng : Comments_Range; begin - Save_Comments (Rng); Coord := Scanner.Get_Current_Coord; - Gather_Comments_Line (Rng, Coord.Line_Pos, Uns32 (N)); + Gather_Comments_Line (Coord.Line_Pos, Uns32 (N)); end Gather_Comments_Line; function Find_First_Comment (File : Source_File_Entry; N : Node) diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index 421a08edc..044f74e79 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -11196,7 +11196,7 @@ package body Vhdl.Parse is return Res; end Parse_Package_Header; - -- precond : token (after 'IS') + -- precond : token (after 'IS', the first token of declarations or header). -- postcond: next token. -- -- [ LRM93 2.5, LRM08 4.7 ] @@ -11396,6 +11396,8 @@ package body Vhdl.Parse is end if; if Flag_Gather_Comments then + -- Save existing comments (before the 'is'). Those comments will + -- be associated with this package. File_Comments.Save_Comments (Comments); end if; |