diff options
Diffstat (limited to 'src/vhdl/parse.adb')
-rw-r--r-- | src/vhdl/parse.adb | 16 |
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 |