diff options
author | Tristan Gingold <tgingold@free.fr> | 2023-02-04 09:57:52 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2023-02-04 09:57:52 +0100 |
commit | bf0423ee430ba2c1aa4f51c2cb5014c1da85238a (patch) | |
tree | 6bce2c8f96f1d01e3f66d340acc3114049d5a12b | |
parent | cc98c151058602f0ee00d4d05aeaabde500bd88e (diff) | |
download | ghdl-bf0423ee430ba2c1aa4f51c2cb5014c1da85238a.tar.gz ghdl-bf0423ee430ba2c1aa4f51c2cb5014c1da85238a.tar.bz2 ghdl-bf0423ee430ba2c1aa4f51c2cb5014c1da85238a.zip |
vhdl-prints: improve output of generate statements
-rw-r--r-- | src/vhdl/vhdl-prints.adb | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/vhdl/vhdl-prints.adb b/src/vhdl/vhdl-prints.adb index c1accef24..dcf348099 100644 --- a/src/vhdl/vhdl-prints.adb +++ b/src/vhdl/vhdl-prints.adb @@ -3937,20 +3937,19 @@ package body Vhdl.Prints is Has_Beg : constant Boolean := Get_Has_Begin (Bod); Has_End : constant Boolean := Get_Has_End (Bod); begin + Start_Vbox (Ctxt); Disp_Declaration_Chain (Ctxt, Bod); + Close_Vbox (Ctxt); + if Has_Beg then Start_Hbox (Ctxt); Disp_Token (Ctxt, Tok_Begin); Close_Hbox (Ctxt); end if; - if Has_Beg or Has_End then - Start_Vbox (Ctxt); - end if; + Start_Vbox (Ctxt); Disp_Concurrent_Statement_Chain (Ctxt, Bod); - if Has_Beg or Has_End then - Close_Vbox (Ctxt); - end if; + Close_Vbox (Ctxt); if Has_End then Start_Hbox (Ctxt); @@ -3973,10 +3972,8 @@ package body Vhdl.Prints is Disp_Token (Ctxt, Tok_Generate); Close_Hbox (Ctxt); - Start_Vbox (Ctxt); Disp_Generate_Statement_Body (Ctxt, Get_Generate_Statement_Body (Stmt)); - Close_Vbox (Ctxt); Disp_End (Ctxt, Stmt, Tok_Generate); end Disp_For_Generate_Statement; @@ -4004,9 +4001,7 @@ package body Vhdl.Prints is Disp_Token (Ctxt, Tok_Generate); Close_Hbox (Ctxt); - Start_Vbox (Ctxt); Disp_Generate_Statement_Body (Ctxt, Bod); - Close_Vbox (Ctxt); Clause := Get_Generate_Else_Clause (Clause); exit when Clause = Null_Iir; @@ -4049,9 +4044,7 @@ package body Vhdl.Prints is Disp_Token (Ctxt, Tok_Double_Arrow); Close_Hbox (Ctxt); - Start_Vbox (Ctxt); Disp_Generate_Statement_Body (Ctxt, Bod); - Close_Vbox (Ctxt); end loop; Close_Vbox (Ctxt); Disp_End (Ctxt, Stmt, Tok_Generate); |