diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-12-20 06:56:36 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-12-20 06:56:36 +0100 |
commit | 78760e12065e49d5b11d3edf0eb397866ac1ebfa (patch) | |
tree | a18f799ba299a3767e7b86a38aa77b433a621993 /src/vhdl | |
parent | 6185c8d2de85828d53135433019968aa54699947 (diff) | |
download | ghdl-78760e12065e49d5b11d3edf0eb397866ac1ebfa.tar.gz ghdl-78760e12065e49d5b11d3edf0eb397866ac1ebfa.tar.bz2 ghdl-78760e12065e49d5b11d3edf0eb397866ac1ebfa.zip |
files_comments: add comments, slightly simplify the interface
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; |