aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-09-29 21:28:41 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-09-29 21:28:41 -0400
commitaa3c988854bde354efd1dbcb3d85efcc56ad9cd2 (patch)
treec2c6cb4fa6cd972f525e7d4da6f350ce84612bb9
parent1798fb7a46632a9ccf6692fb42816a8e917a9d25 (diff)
Fix print tree only if DEBUG is set
-rw-r--r--pc.y4
1 files changed, 4 insertions, 0 deletions
diff --git a/pc.y b/pc.y
index c55074e..1f9e9f1 100644
--- a/pc.y
+++ b/pc.y
@@ -97,7 +97,9 @@ program
'.'
{
set_ret_type($9);
+#ifdef DEBUG
print_tree($9);
+#endif
free_tree($9);
free_tree($4);
#ifdef DEBUG
@@ -171,7 +173,9 @@ sub_prog_declaration
compound_statement
{
set_ret_type($4);
+#ifdef DEBUG
print_tree($4);
+#endif
free_tree($4);
#ifdef DEBUG
print_scope(cur_scope);