diff options
author | Tristan Gingold <tgingold@free.fr> | 2019-05-10 21:43:00 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2019-05-10 21:43:00 +0200 |
commit | b76ff335a807be97a79e272b5e9bf08a99d3d8d6 (patch) | |
tree | 414e004aaaa69fa5a7987028ba54429e0707e3a3 /src/psl/psl-errors.adb | |
parent | 4be73be561379cff6b0e5966e020d90387085034 (diff) | |
download | ghdl-b76ff335a807be97a79e272b5e9bf08a99d3d8d6.tar.gz ghdl-b76ff335a807be97a79e272b5e9bf08a99d3d8d6.tar.bz2 ghdl-b76ff335a807be97a79e272b5e9bf08a99d3d8d6.zip |
vhdl: decouple errorouts a bit more.
Diffstat (limited to 'src/psl/psl-errors.adb')
-rw-r--r-- | src/psl/psl-errors.adb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/psl/psl-errors.adb b/src/psl/psl-errors.adb index a71b18e86..a4bd0980c 100644 --- a/src/psl/psl-errors.adb +++ b/src/psl/psl-errors.adb @@ -20,6 +20,17 @@ with Errorout; use Errorout; with PSL.Nodes; package body PSL.Errors is + function "+" (L : PSL_Node) return Location_Type + is + use PSL.Nodes; + begin + if L = Null_Node then + return No_Location; + else + return PSL.Nodes.Get_Location (L); + end if; + end "+"; + procedure Error_Kind (Msg : String; N : PSL_Node) is begin Log (Msg); @@ -30,6 +41,6 @@ package body PSL.Errors is procedure Error_Msg_Sem (Msg: String; Loc : PSL_Node) is begin - Report_Msg (Msgid_Error, Semantic, +Loc, Msg, No_Eargs, False); + Report_Msg (Msgid_Error, Semantic, +(+Loc), Msg, No_Eargs, False); end Error_Msg_Sem; end PSL.Errors; |