diff options
author | Tristan Gingold <tgingold@free.fr> | 2018-12-23 21:00:42 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2018-12-23 21:00:42 +0100 |
commit | 317b196ae4552f23e31accd6e10a11e2903f9b31 (patch) | |
tree | 15451958243f0a1ae4102a593374b3998c7dcc27 /src/vhdl/sem_expr.adb | |
parent | feb198c93bd936b20d5b3d878080ec4cdf7e480b (diff) | |
download | ghdl-317b196ae4552f23e31accd6e10a11e2903f9b31.tar.gz ghdl-317b196ae4552f23e31accd6e10a11e2903f9b31.tar.bz2 ghdl-317b196ae4552f23e31accd6e10a11e2903f9b31.zip |
parse/sem: be more tolerant of parse errors.
Diffstat (limited to 'src/vhdl/sem_expr.adb')
-rw-r--r-- | src/vhdl/sem_expr.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/vhdl/sem_expr.adb b/src/vhdl/sem_expr.adb index e49cfcf8f..a9448940a 100644 --- a/src/vhdl/sem_expr.adb +++ b/src/vhdl/sem_expr.adb @@ -4028,6 +4028,10 @@ package body Sem_Expr is when others => Error_Kind ("sem_physical_literal", Lit); end case; + if Is_Error (Unit_Name) then + return Create_Error_Expr (Res, Error_Mark); + end if; + Unit_Name := Sem_Denoting_Name (Unit_Name); Unit := Get_Named_Entity (Unit_Name); if Get_Kind (Unit) /= Iir_Kind_Unit_Declaration then @@ -4944,7 +4948,7 @@ package body Sem_Expr is Result_Type : Iir; Expr_Type : Iir; begin - if Expr = Null_Iir then + if Is_Error (Expr) then return; end if; |