diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-05 18:41:43 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-05 18:41:43 +0100 |
commit | 7ca1ebe6130e10414162c15c3e85665ca4e1793c (patch) | |
tree | 514574a5669a723459106e4a336792c31f0ec7fe /src | |
parent | 402f082e491d47addb070956f93f78ba6d737acc (diff) | |
download | ghdl-7ca1ebe6130e10414162c15c3e85665ca4e1793c.tar.gz ghdl-7ca1ebe6130e10414162c15c3e85665ca4e1793c.tar.bz2 ghdl-7ca1ebe6130e10414162c15c3e85665ca4e1793c.zip |
Move Error_Msg_Scan to scanner.
Diffstat (limited to 'src')
-rw-r--r-- | src/vhdl/errorout.adb | 30 | ||||
-rw-r--r-- | src/vhdl/errorout.ads | 11 | ||||
-rw-r--r-- | 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, |