diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-04-03 11:43:42 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-04-06 20:10:54 +0200 |
commit | 77d71c72f10cb8a1779dfddcf2a5053c728300ec (patch) | |
tree | a6adcc528dc1845e16cf7b4c992a5384a5cf6f1a /src/vhdl/vhdl-disp_tree.adb | |
parent | 6ccedcb1f76081df973776f0e4e6909e21de8760 (diff) | |
download | ghdl-77d71c72f10cb8a1779dfddcf2a5053c728300ec.tar.gz ghdl-77d71c72f10cb8a1779dfddcf2a5053c728300ec.tar.bz2 ghdl-77d71c72f10cb8a1779dfddcf2a5053c728300ec.zip |
vhdl: add scalar_size. Size of scalar types is computed during analysis.
Diffstat (limited to 'src/vhdl/vhdl-disp_tree.adb')
-rw-r--r-- | src/vhdl/vhdl-disp_tree.adb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/vhdl/vhdl-disp_tree.adb b/src/vhdl/vhdl-disp_tree.adb index cbf9c324a..16aaab9f8 100644 --- a/src/vhdl/vhdl-disp_tree.adb +++ b/src/vhdl/vhdl-disp_tree.adb @@ -341,6 +341,20 @@ package body Vhdl.Disp_Tree is function Image_Token_Type (Tok : Vhdl.Tokens.Token_Type) return String renames Vhdl.Tokens.Image; + function Image_Scalar_Size (Sz : Scalar_Size) return String is + begin + case Sz is + when Scalar_8 => + return "8"; + when Scalar_16 => + return "16"; + when Scalar_32 => + return "32"; + when Scalar_64 => + return "64"; + end case; + end Image_Scalar_Size; + function Image_String8 (N : Iir) return String is use Str_Table; @@ -577,6 +591,8 @@ package body Vhdl.Disp_Tree is (Get_File_Checksum_Id (N, F))); when Type_Token_Type => Log_Line (Image_Token_Type (Get_Token_Type (N, F))); + when Type_Scalar_Size => + Log_Line (Image_Scalar_Size (Get_Scalar_Size (N, F))); when Type_Name_Id => Log (Image_Name_Id (Get_Name_Id (N, F))); Log (" "); |