aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/parse.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-08-31 20:24:41 +0200
committerTristan Gingold <tgingold@free.fr>2016-09-01 06:36:52 +0200
commit4e6853861f3809d45424b6eb372ccd91ed76f0cb (patch)
tree68f1ea12f7aeca8c3174dbe9c2eb5225fe677db5 /src/vhdl/parse.adb
parenta7f63a8a08aeaef263c7d4a404d7d827cac89b9a (diff)
downloadghdl-4e6853861f3809d45424b6eb372ccd91ed76f0cb.tar.gz
ghdl-4e6853861f3809d45424b6eb372ccd91ed76f0cb.tar.bz2
ghdl-4e6853861f3809d45424b6eb372ccd91ed76f0cb.zip
vhdl08: parse and analyze interface types.
Diffstat (limited to 'src/vhdl/parse.adb')
-rw-r--r--src/vhdl/parse.adb16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index a3b9a52b0..4be6c1ce6 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -1497,6 +1497,22 @@ package body Parse is
("package interface not allowed before vhdl 08");
end if;
Inters := Parse_Interface_Package_Declaration;
+ when Tok_Type =>
+ if Ctxt /= Generic_Interface_List then
+ Error_Msg_Parse
+ ("type interface only allowed in generic interface");
+ elsif Flags.Vhdl_Std < Vhdl_08 then
+ Error_Msg_Parse
+ ("type interface not allowed before vhdl 08");
+ end if;
+ Inters := Create_Iir (Iir_Kind_Interface_Type_Declaration);
+ Scan_Expect (Tok_Identifier,
+ "am identifier is expected after 'type'");
+ Set_Identifier (Inters, Current_Identifier);
+ Set_Location (Inters);
+
+ -- Skip identifier
+ Scan;
when Tok_Right_Paren =>
if Res = Null_Iir then
Error_Msg_Parse