aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-wave_opt_file.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/grt/grt-wave_opt_file.adb')
-rw-r--r--src/grt/grt-wave_opt_file.adb35
1 files changed, 21 insertions, 14 deletions
diff --git a/src/grt/grt-wave_opt_file.adb b/src/grt/grt-wave_opt_file.adb
index c93c2e885..8147e1bb7 100644
--- a/src/grt/grt-wave_opt_file.adb
+++ b/src/grt/grt-wave_opt_file.adb
@@ -25,16 +25,12 @@
-- Description: See package specifications
-with Grt.Vstrings; use Grt.Vstrings;
with Grt.Errors; use Grt.Errors;
package body Grt.Wave_Opt_File is
procedure Print_Context
- (Line_Context : Line_Context_Acc; Severity : Severity_Type)
- is
- Lineno_Str : String (1 .. Value_String_Size);
- First : Natural;
+ (Line_Pos, Column_Pos : Positive; Severity : Severity_Type) is
begin
case Severity is
when Error =>
@@ -42,21 +38,25 @@ package body Grt.Wave_Opt_File is
when Warning =>
Report_C ("warning: ");
end case;
- Report_C ("in file '");
Report_C (File_Path.all);
- Report_C ("' at line ");
- To_String (Lineno_Str, First, Ghdl_I32 (Line_Context.Num));
- Report_C (Lineno_Str (First .. Lineno_Str'Last));
- Report_C (" - ");
- Report_C (Line_Context.Str.all);
- Report_C (" : ");
+ Report_C (":");
+ Report_C (Line_Pos);
+ Report_C (":");
+ Report_C (Column_Pos);
+ Report_C (": ");
+ end Print_Context;
+
+ procedure Print_Context (Element : Elem_Acc; Severity : Severity_Type) is
+ begin
+ Print_Context
+ (Element.Path_Context.Line_Pos, Element.Column_Pos, Severity);
end Print_Context;
procedure Error_Context (Msg : String;
- Line_Context : Line_Context_Acc;
+ Line_Pos, Column_Pos : Positive;
Severity : Severity_Type := Error) is
begin
- Print_Context (Line_Context, Severity);
+ Print_Context (Line_Pos, Column_Pos, Severity);
case Severity is
when Error =>
Error_E (Msg);
@@ -65,4 +65,11 @@ package body Grt.Wave_Opt_File is
end case;
end Error_Context;
+ procedure Error_Context
+ (Msg : String; Element : Elem_Acc; Severity : Severity_Type := Error) is
+ begin
+ Error_Context
+ (Msg, Element.Path_Context.Line_Pos, Element.Column_Pos, Severity);
+ end Error_Context;
+
end Grt.Wave_Opt_File;