aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-11-14 21:01:25 +0100
committerTristan Gingold <tgingold@free.fr>2016-12-05 03:25:20 +0100
commitc6cbd45bb6d1b4dd77094374f802e53957cf664b (patch)
tree7ee822e0799b059702670ee30ef12ab32b7a8770
parentbd3f76d570e347d16636816e41f09085621b28f1 (diff)
downloadghdl-c6cbd45bb6d1b4dd77094374f802e53957cf664b.tar.gz
ghdl-c6cbd45bb6d1b4dd77094374f802e53957cf664b.tar.bz2
ghdl-c6cbd45bb6d1b4dd77094374f802e53957cf664b.zip
parse: improve error message on missing 'generic map'
-rw-r--r--src/vhdl/parse.adb9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index 99c459027..9cb89c5cd 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -6805,8 +6805,13 @@ package body Parse is
function Parse_Generic_Map_Aspect return Iir is
begin
Expect (Tok_Generic);
+
+ -- Skip 'generic'.
Scan_Expect (Tok_Map);
+
+ -- Skip 'map'.
Scan;
+
return Parse_Association_List_In_Parenthesis;
end Parse_Generic_Map_Aspect;
@@ -8539,6 +8544,10 @@ package body Parse is
if Current_Token = Tok_Generic then
Set_Generic_Map_Aspect_Chain (Res, Parse_Generic_Map_Aspect);
+ elsif Current_Token = Tok_Left_Paren then
+ Error_Msg_Parse ("missing 'generic map'");
+ Set_Generic_Map_Aspect_Chain
+ (Res, Parse_Association_List_In_Parenthesis);
end if;
Expect (Tok_Semi_Colon);