aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-parse.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-06-01 07:56:39 +0200
committerTristan Gingold <tgingold@free.fr>2022-06-01 07:56:39 +0200
commita9e699478dd0eae8d277fe25773fe5969bcf3cde (patch)
treee206c4e4ab549c004adcbb5dde973bbd8c9b1d9b /src/vhdl/vhdl-parse.adb
parent1e5ada114810890ea80223ee07713876eecfa289 (diff)
downloadghdl-a9e699478dd0eae8d277fe25773fe5969bcf3cde.tar.gz
ghdl-a9e699478dd0eae8d277fe25773fe5969bcf3cde.tar.bz2
ghdl-a9e699478dd0eae8d277fe25773fe5969bcf3cde.zip
vhdl: avoid crash after an error. For #2070
Diffstat (limited to 'src/vhdl/vhdl-parse.adb')
-rw-r--r--src/vhdl/vhdl-parse.adb4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb
index 6e574b0a5..48c6de4c9 100644
--- a/src/vhdl/vhdl-parse.adb
+++ b/src/vhdl/vhdl-parse.adb
@@ -2145,7 +2145,7 @@ package body Vhdl.Parse is
Tm := Parse_Type_Mark (Check_Paren => True);
- if Current_Token = Tok_Of then
+ if Tm /= Null_Iir and then Current_Token = Tok_Of then
if Vhdl_Std < Vhdl_19 then
Error_Msg_Parse
("return identifier not allowed before vhdl 2019");
@@ -7358,6 +7358,8 @@ package body Vhdl.Parse is
| Iir_Kind_Signature =>
Error_Msg_Parse
("invalid name for a procedure call or missing assignment");
+ when Iir_Kind_Error =>
+ null;
when others =>
Error_Kind ("parenthesis_name_to_procedure_call", Name);
end case;