aboutsummaryrefslogtreecommitdiff
path: root/pc.y
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-08 23:57:31 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-08 23:57:31 -0400
commitd1a31ddde4f7c491a8e03a9a8fde30799b591ee8 (patch)
treee16feb47a60f6e82abd9f4291383548e97287476 /pc.y
parent2aa793357f8e18d666d781a5ef99e2b3159b5a86 (diff)
Add macro to control generation of code
Diffstat (limited to 'pc.y')
-rw-r--r--pc.y5
1 files changed, 5 insertions, 0 deletions
diff --git a/pc.y b/pc.y
index 9c942bd..d891260 100644
--- a/pc.y
+++ b/pc.y
@@ -108,7 +108,10 @@ program
#ifdef DEBUG
print_tree($9);
#endif
+
+#ifdef GENERATE_CODE
gen_code($9, $2);
+#endif
free_tree($9);
#ifdef DEBUG
@@ -203,7 +206,9 @@ sub_prog_declaration
#ifdef DEBUG
print_tree($4);
#endif
+#ifdef GENERATE_CODE
gen_code($4, name);
+#endif
free_tree($4);
#ifdef DEBUG