aboutsummaryrefslogtreecommitdiffstats
path: root/src/errorout.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-05-09 15:50:27 +0200
committerTristan Gingold <tgingold@free.fr>2020-05-09 16:31:20 +0200
commit23c923649a05e35bf57da3b290ea2136e761f565 (patch)
treea19e194269866ad28e0d1be440ab635e486f3023 /src/errorout.adb
parentc9d2cccb38b985783108f187398a0a0af9f6ab62 (diff)
downloadghdl-23c923649a05e35bf57da3b290ea2136e761f565.tar.gz
ghdl-23c923649a05e35bf57da3b290ea2136e761f565.tar.bz2
ghdl-23c923649a05e35bf57da3b290ea2136e761f565.zip
synth: correctly quote nets name in error messages.
Diffstat (limited to 'src/errorout.adb')
-rw-r--r--src/errorout.adb17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/errorout.adb b/src/errorout.adb
index ab05c956a..f113623ae 100644
--- a/src/errorout.adb
+++ b/src/errorout.adb
@@ -158,17 +158,22 @@ package body Errorout is
procedure Output_Identifier (Id : Name_Id) is
begin
- Report_Handler.Message ("""");
Report_Handler.Message (Name_Table.Image (Id));
- Report_Handler.Message ("""");
end Output_Identifier;
- procedure Output_Character (C : Character) is
+ procedure Output_Quoted_Identifier (Id : Name_Id) is
+ begin
+ Report_Handler.Message ("""");
+ Output_Identifier (Id);
+ Report_Handler.Message ("""");
+ end Output_Quoted_Identifier;
+
+ procedure Output_Quoted_Character (C : Character) is
begin
Report_Handler.Message ("'");
Report_Handler.Message ((1 => C));
Report_Handler.Message ("'");
- end Output_Character;
+ end Output_Quoted_Character;
procedure Location_To_Position (Location : Location_Type;
File : out Source_File_Entry;
@@ -322,13 +327,13 @@ package body Errorout is
end if;
when Earg_Id =>
if Format = 'i' then
- Output_Identifier (Arg.Val_Id);
+ Output_Quoted_Identifier (Arg.Val_Id);
else
raise Internal_Error;
end if;
when Earg_Char =>
if Format = 'c' then
- Output_Character (Arg.Val_Char);
+ Output_Quoted_Character (Arg.Val_Char);
else
raise Internal_Error;
end if;