From 15ae95c16ee4bf00432e43afd693ab4aa5ada138 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Mon, 30 Dec 2019 16:22:01 +0100 Subject: ams-vhdl: handle record nature end name. --- src/vhdl/vhdl-parse.adb | 3 +++ src/vhdl/vhdl-prints.adb | 2 ++ 2 files changed, 5 insertions(+) (limited to 'src') diff --git a/src/vhdl/vhdl-parse.adb b/src/vhdl/vhdl-parse.adb index e17846618..3ec1777a2 100644 --- a/src/vhdl/vhdl-parse.adb +++ b/src/vhdl/vhdl-parse.adb @@ -3583,6 +3583,9 @@ package body Vhdl.Parse is when Tok_Record => Def := Parse_Record_Nature_Definition; Set_Location (Def, Loc); + if Current_Token = Tok_Identifier then + Check_End_Name (Ident, Def); + end if; when Tok_Identifier => Def := Parse_Scalar_Nature_Definition; Set_Location (Def, Loc); diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb index 47afb99c3..b8513d28e 100644 --- a/src/vhdl/vhdl-prints.adb +++ b/src/vhdl/vhdl-prints.adb @@ -274,6 +274,8 @@ package body Vhdl.Prints is | Iir_Kind_Protected_Type_Declaration => -- Used for 'end' DECL_NAME. Disp_Identifier (Ctxt, Get_Type_Declarator (Decl)); + when Iir_Kind_Record_Nature_Definition => + Disp_Identifier (Ctxt, Get_Nature_Declarator (Decl)); when Iir_Kind_Component_Instantiation_Statement => Disp_Ident (Ctxt, Get_Label (Decl)); when Iir_Kind_Design_Unit => -- cgit v1.2.3