From 7ca1ebe6130e10414162c15c3e85665ca4e1793c Mon Sep 17 00:00:00 2001
From: Tristan Gingold <tgingold@free.fr>
Date: Wed, 5 Dec 2018 18:41:43 +0100
Subject: Move Error_Msg_Scan to scanner.

---
 src/vhdl/errorout.adb | 30 ------------------------------
 src/vhdl/errorout.ads | 11 -----------
 src/vhdl/scanner.adb  | 32 ++++++++++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 41 deletions(-)

diff --git a/src/vhdl/errorout.adb b/src/vhdl/errorout.adb
index 4d38fc9d9..24b0f5493 100644
--- a/src/vhdl/errorout.adb
+++ b/src/vhdl/errorout.adb
@@ -502,36 +502,6 @@ package body Errorout is
       Report_Msg (Id, Elaboration, +Loc, Msg, Args, Cont);
    end Warning_Msg_Elab;
 
-   -- Disp a message during scan.
-   procedure Error_Msg_Scan (Msg: String) is
-   begin
-      Report_Msg (Msgid_Error, Scan, No_Location, Msg);
-   end Error_Msg_Scan;
-
-   procedure Error_Msg_Scan (Loc : Location_Type; Msg: String) is
-   begin
-      Report_Msg (Msgid_Error, Scan, Loc, Msg);
-   end Error_Msg_Scan;
-
-   procedure Error_Msg_Scan (Msg: String; Arg1 : Earg_Type) is
-   begin
-      Report_Msg (Msgid_Error, Scan, No_Location, Msg, (1 => Arg1));
-   end Error_Msg_Scan;
-
-   -- Disp a message during scan.
-   procedure Warning_Msg_Scan (Id : Msgid_Warnings; Msg: String) is
-   begin
-      Report_Msg (Id, Scan, No_Location, Msg);
-   end Warning_Msg_Scan;
-
-   procedure Warning_Msg_Scan (Id : Msgid_Warnings;
-                               Msg: String;
-                               Arg1 : Earg_Type;
-                               Cont : Boolean := False) is
-   begin
-      Report_Msg (Id, Scan, No_Location, Msg, (1 => Arg1), Cont);
-   end Warning_Msg_Scan;
-
    -- Disp a message during semantic analysis.
    -- LOC is used for location and current token.
    procedure Error_Msg_Sem (Msg: String; Loc: in Iir) is
diff --git a/src/vhdl/errorout.ads b/src/vhdl/errorout.ads
index 863c7b198..c548f5822 100644
--- a/src/vhdl/errorout.ads
+++ b/src/vhdl/errorout.ads
@@ -228,17 +228,6 @@ package Errorout is
    --  Warn about an option.
    procedure Warning_Msg_Option (Id : Msgid_Warnings; Msg: String);
 
-   -- Disp a message during scan.
-   -- The current location is automatically displayed before the message.
-   procedure Error_Msg_Scan (Msg: String);
-   procedure Error_Msg_Scan (Msg: String; Arg1 : Earg_Type);
-   procedure Error_Msg_Scan (Loc : Location_Type; Msg: String);
-   procedure Warning_Msg_Scan (Id : Msgid_Warnings; Msg: String);
-   procedure Warning_Msg_Scan (Id : Msgid_Warnings;
-                               Msg: String;
-                               Arg1 : Earg_Type;
-                               Cont : Boolean := False);
-
    -- Disp a message during semantic analysis.
    procedure Warning_Msg_Sem (Id : Msgid_Warnings;
                               Loc : Location_Type;
diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb
index 5de12cac2..868aa9182 100644
--- a/src/vhdl/scanner.adb
+++ b/src/vhdl/scanner.adb
@@ -160,6 +160,38 @@ package body Scanner is
    end record;
    pragma Suppress_Initialization (Scan_Context);
 
+   -- Disp a message during scan.
+   -- The current location is automatically displayed before the message.
+   -- Disp a message during scan.
+   procedure Error_Msg_Scan (Msg: String) is
+   begin
+      Report_Msg (Msgid_Error, Scan, No_Location, Msg);
+   end Error_Msg_Scan;
+
+   procedure Error_Msg_Scan (Loc : Location_Type; Msg: String) is
+   begin
+      Report_Msg (Msgid_Error, Scan, Loc, Msg);
+   end Error_Msg_Scan;
+
+   procedure Error_Msg_Scan (Msg: String; Arg1 : Earg_Type) is
+   begin
+      Report_Msg (Msgid_Error, Scan, No_Location, Msg, (1 => Arg1));
+   end Error_Msg_Scan;
+
+   -- Disp a message during scan.
+   procedure Warning_Msg_Scan (Id : Msgid_Warnings; Msg: String) is
+   begin
+      Report_Msg (Id, Scan, No_Location, Msg);
+   end Warning_Msg_Scan;
+
+   procedure Warning_Msg_Scan (Id : Msgid_Warnings;
+                               Msg: String;
+                               Arg1 : Earg_Type;
+                               Cont : Boolean := False) is
+   begin
+      Report_Msg (Id, Scan, No_Location, Msg, (1 => Arg1), Cont);
+   end Warning_Msg_Scan;
+
    -- The current context.
    -- Default value is an invalid context.
    Current_Context: Scan_Context := (Source => null,
-- 
cgit v1.2.3