aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl/vhdl-disp_tree.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2021-08-04 10:02:21 +0200
committerTristan Gingold <tgingold@free.fr>2021-08-04 10:02:21 +0200
commitd83635035bb72eeef7d999e5b7405eb81b96df1b (patch)
tree8d7431b6b38053e5df5d803d981cad3ca531d10c /src/vhdl/vhdl-disp_tree.adb
parentd41483dd6fb531f3314d28ffb49e9fc09b72130f (diff)
downloadghdl-d83635035bb72eeef7d999e5b7405eb81b96df1b.tar.gz
ghdl-d83635035bb72eeef7d999e5b7405eb81b96df1b.tar.bz2
ghdl-d83635035bb72eeef7d999e5b7405eb81b96df1b.zip
vhdl-disp_tree: disp integer literal value
Diffstat (limited to 'src/vhdl/vhdl-disp_tree.adb')
-rw-r--r--src/vhdl/vhdl-disp_tree.adb42
1 files changed, 27 insertions, 15 deletions
diff --git a/src/vhdl/vhdl-disp_tree.adb b/src/vhdl/vhdl-disp_tree.adb
index 35f18e634..9dd5c37ae 100644
--- a/src/vhdl/vhdl-disp_tree.adb
+++ b/src/vhdl/vhdl-disp_tree.adb
@@ -418,21 +418,33 @@ package body Vhdl.Disp_Tree is
Log (" ");
Disp_Iir_Number (N);
- -- Be nice: print type name for a type definition.
- if K in Iir_Kinds_Type_And_Subtype_Definition
- or K = Iir_Kind_Wildcard_Type_Definition
- then
- declare
- Decl : constant Iir := Get_Type_Declarator (N);
- begin
- if Decl /= Null_Iir
- and then Get_Identifier (Decl) /= Null_Identifier
- then
- Log (" ");
- Log (Image_Name_Id (Get_Identifier (Decl)));
- end if;
- end;
- end if;
+ -- Be nice: print additional info
+ case K is
+ when Iir_Kinds_Type_And_Subtype_Definition
+ | Iir_Kind_Wildcard_Type_Definition =>
+ -- Print type name for a type definition.
+ declare
+ Decl : constant Iir := Get_Type_Declarator (N);
+ begin
+ if Decl /= Null_Iir
+ and then Get_Identifier (Decl) /= Null_Identifier
+ then
+ Log (" ");
+ Log (Image_Name_Id (Get_Identifier (Decl)));
+ end if;
+ end;
+ when Iir_Kind_Integer_Literal =>
+ declare
+ V : constant Int64 := Get_Value (N);
+ begin
+ if V < 0 then
+ Log (" ");
+ end if;
+ Log (Int64'Image (V));
+ end;
+ when others =>
+ null;
+ end case;
Log_Line;
end Disp_Header;