aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-formatters.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-11-27 08:21:36 +0100
committerTristan Gingold <tgingold@free.fr>2022-11-27 12:30:40 +0100
commit55e669e57725017cb356907abcfe7a4953563296 (patch)
tree0ca13c7f01014cb4aed75c3921057d7616018447 /src/vhdl/vhdl-formatters.adb
parentd2a0fe9e9c097a5130a6d6a6f2c8c76bf4394ae0 (diff)
downloadghdl-55e669e57725017cb356907abcfe7a4953563296.tar.gz
ghdl-55e669e57725017cb356907abcfe7a4953563296.tar.bz2
ghdl-55e669e57725017cb356907abcfe7a4953563296.zip
vhdl: rework comment gathering to handle empty lines.
Diffstat (limited to 'src/vhdl/vhdl-formatters.adb')
-rw-r--r--src/vhdl/vhdl-formatters.adb4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-formatters.adb b/src/vhdl/vhdl-formatters.adb
index b40615f99..03c72dbaa 100644
--- a/src/vhdl/vhdl-formatters.adb
+++ b/src/vhdl/vhdl-formatters.adb
@@ -846,9 +846,12 @@ package body Vhdl.Formatters is
is
use Format_Disp_Ctxt;
Sfe : constant Source_File_Entry := Get_Design_File_Source (F);
+ Prev_Flag_Gather_Comments : constant Boolean :=
+ Flags.Flag_Gather_Comments;
begin
Scanner.Flag_Comment := True;
Scanner.Flag_Newline := True;
+ Flags.Flag_Gather_Comments := False;
Set_File (Sfe);
Scan;
@@ -859,6 +862,7 @@ package body Vhdl.Formatters is
Close_File;
Scanner.Flag_Comment := False;
Scanner.Flag_Newline := False;
+ Flags.Flag_Gather_Comments := Prev_Flag_Gather_Comments;
Append_Eof (Ctxt);
end Format_Init;