aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pc.h1
-rw-r--r--pc.y5
2 files changed, 5 insertions, 1 deletions
diff --git a/pc.h b/pc.h
index 79174f4..04f8bfe 100644
--- a/pc.h
+++ b/pc.h
@@ -15,4 +15,3 @@ int set_func_types(ptree*, int*, int);
int get_call_types(ptree*, int*, int);
#endif
-#define DEBUG
diff --git a/pc.y b/pc.y
index b0f9e4a..616b37d 100644
--- a/pc.y
+++ b/pc.y
@@ -9,6 +9,7 @@
#include "tree.h"
#include "y.tab.h"
#include "pc.h"
+#include "gen_code.h"
#include "sem_check.h"
@@ -107,6 +108,8 @@ program
#ifdef DEBUG
print_tree($9);
#endif
+ gen_code($9);
+
free_tree($9);
#ifdef DEBUG
print_scope(cur_scope);
@@ -191,6 +194,8 @@ sub_prog_declaration
#ifdef DEBUG
print_tree($4);
#endif
+ gen_code($4);
+
free_tree($4);
#ifdef DEBUG
print_scope(cur_scope);