aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-05-23 18:31:36 +0200
committerTristan Gingold <tgingold@free.fr>2019-05-23 18:31:36 +0200
commit6396cb1f5ec1958a07362d96dbae9040df56e14d (patch)
treea63476033eb291783991bfa98245140f780c5344
parente256016d4354006e950da7b3aef8d90460d89dc1 (diff)
downloadghdl-6396cb1f5ec1958a07362d96dbae9040df56e14d.tar.gz
ghdl-6396cb1f5ec1958a07362d96dbae9040df56e14d.tar.bz2
ghdl-6396cb1f5ec1958a07362d96dbae9040df56e14d.zip
ghdlprint: exit in case of error.
-rw-r--r--src/ghdldrv/ghdlprint.adb6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ghdldrv/ghdlprint.adb b/src/ghdldrv/ghdlprint.adb
index 522fd8b1d..91168c023 100644
--- a/src/ghdldrv/ghdlprint.adb
+++ b/src/ghdldrv/ghdlprint.adb
@@ -1017,7 +1017,9 @@ package body Ghdlprint is
for I in Args'Range loop
Id := Name_Table.Get_Identifier (Args (I).all);
Design_File := Load_File_Name (Id);
- if Design_File = Null_Iir then
+ if Design_File = Null_Iir
+ or else Errorout.Nbr_Errors > 0
+ then
raise Errorout.Compilation_Error;
end if;
@@ -1117,7 +1119,7 @@ package body Ghdlprint is
loop
Scan;
if Ref_Tokens.Table (Tok_Idx) /= Current_Token then
- Report_Msg (Msgid_Error, Errorout.Parse, No_Source_Coord,
+ Report_Msg (Msgid_Error, Errorout.Parse, Get_Token_Coord,
"token mismatch");
exit;
end if;