aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2019-12-30 06:28:59 +0100
committerTristan Gingold <tgingold@free.fr>2019-12-30 06:28:59 +0100
commit8eda0ff3ed3656336ca918983e3a2df5e0276d18 (patch)
tree21177652e79bade92aedacca5eccbf95c551629a
parenta6a74017fd6b467627f23ff733218af1062d139f (diff)
downloadghdl-8eda0ff3ed3656336ca918983e3a2df5e0276d18.tar.gz
ghdl-8eda0ff3ed3656336ca918983e3a2df5e0276d18.tar.bz2
ghdl-8eda0ff3ed3656336ca918983e3a2df5e0276d18.zip
ams-vhdl: print subnature declarations.
-rw-r--r--src/vhdl/vhdl-prints.adb17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb
index 4a1eb63b7..690a971bb 100644
--- a/src/vhdl/vhdl-prints.adb
+++ b/src/vhdl/vhdl-prints.adb
@@ -250,6 +250,7 @@ package body Vhdl.Prints is
| Iir_Kind_Library_Declaration
| Iir_Kind_Unit_Declaration
| Iir_Kind_Nature_Declaration
+ | Iir_Kind_Subnature_Declaration
| Iir_Kind_Terminal_Declaration
| Iir_Kinds_Quantity_Declaration
| Iir_Kind_Group_Template_Declaration
@@ -1066,7 +1067,7 @@ package body Vhdl.Prints is
begin
Start_Hbox (Ctxt);
Disp_Token (Ctxt, Tok_Nature);
- Disp_Name_Of (Ctxt, Decl);
+ Disp_Identifier (Ctxt, Decl);
Disp_Token (Ctxt, Tok_Is);
Disp_Nature_Definition (Ctxt, Get_Nature (Decl));
Disp_Token (Ctxt, Tok_Semi_Colon);
@@ -1088,6 +1089,18 @@ package body Vhdl.Prints is
end case;
end Disp_Subnature_Indication;
+ procedure Disp_Subnature_Declaration
+ (Ctxt : in out Ctxt_Class; Decl : Iir) is
+ begin
+ Start_Hbox (Ctxt);
+ Disp_Token (Ctxt, Tok_Subnature);
+ Disp_Identifier (Ctxt, Decl);
+ Disp_Token (Ctxt, Tok_Is);
+ Disp_Subnature_Indication (Ctxt, Get_Subnature_Indication (Decl));
+ Disp_Token (Ctxt, Tok_Semi_Colon);
+ Close_Hbox (Ctxt);
+ end Disp_Subnature_Declaration;
+
procedure Disp_Mode (Ctxt : in out Ctxt_Class; Mode: Iir_Mode) is
begin
case Mode is
@@ -2333,6 +2346,8 @@ package body Vhdl.Prints is
Decl := Get_Chain (Decl);
end if;
end;
+ when Iir_Kind_Subnature_Declaration =>
+ Disp_Subnature_Declaration (Ctxt, Decl);
when Iir_Kind_Non_Object_Alias_Declaration =>
Disp_Non_Object_Alias_Declaration (Ctxt, Decl);
when Iir_Kind_Function_Declaration