diff options
author | Jonsba <jonasb@tranquille.ch> | 2016-07-28 08:04:14 +0200 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2016-07-28 08:04:14 +0200 |
commit | d0d04ba9b19e0f4a0db16c70db1b3452e16d6923 (patch) | |
tree | 3bd8274073368ed39ba54eaaa92e0c0dbb0f8588 /src/grt/grt-wave_opt_file-parse-debug.adb | |
parent | cc352d278fcce918d374406ff64c27cde0a59402 (diff) | |
download | ghdl-d0d04ba9b19e0f4a0db16c70db1b3452e16d6923.tar.gz ghdl-d0d04ba9b19e0f4a0db16c70db1b3452e16d6923.tar.bz2 ghdl-d0d04ba9b19e0f4a0db16c70db1b3452e16d6923.zip |
Changes in warning/error messages formatting in the Wave_Opt_File pac… (#124)
Changes in warning/error messages formatting in the Wave_Opt_File packages to match better the way ghdl print warning/error messages. A little code cleanup.
Diffstat (limited to 'src/grt/grt-wave_opt_file-parse-debug.adb')
-rw-r--r-- | src/grt/grt-wave_opt_file-parse-debug.adb | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/grt/grt-wave_opt_file-parse-debug.adb b/src/grt/grt-wave_opt_file-parse-debug.adb index 2f8c66ec6..3461c9f3c 100644 --- a/src/grt/grt-wave_opt_file-parse-debug.adb +++ b/src/grt/grt-wave_opt_file-parse-debug.adb @@ -29,6 +29,9 @@ with Grt.Astdio; use Grt.Astdio; package body Grt.Wave_Opt_File.Parse.Debug is + -- Dump recursively an element of the tree. + procedure Dump_Sub_Tree (Cursor : Elem_Acc); + procedure Dump_Tree is begin New_Line; @@ -39,22 +42,24 @@ package body Grt.Wave_Opt_File.Parse.Debug is else Put_Line ("Instances : "); end if; - Dump_Sub_Tree (Trees (Index), 1); + Dump_Sub_Tree (Trees (Index)); end loop; Put_Line ("----------- END -----------------"); New_Line; end Dump_Tree; - procedure Dump_Sub_Tree (Cursor : Elem_Acc; Level : Positive) +------------------------------------------------------------------------------- + + procedure Dump_Sub_Tree (Cursor : Elem_Acc) is Sibling_Cursor : Elem_Acc; begin Sibling_Cursor := Cursor; while Sibling_Cursor /= null loop - Put ((3 .. 2 * Level => ' ')); + Put ((3 .. 2 * Sibling_Cursor.Level => ' ')); Put ('/'); Put_Line (Sibling_Cursor.Name.all); - Dump_Sub_Tree (Sibling_Cursor.Next_Child, Level + 1); + Dump_Sub_Tree (Sibling_Cursor.Next_Child); Sibling_Cursor := Sibling_Cursor.Next_Sibling; end loop; end Dump_Sub_Tree; |