aboutsummaryrefslogtreecommitdiff
path: root/pc.y
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-10-06 15:41:46 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-10-06 20:08:32 -0400
commit0a3dca5d297f039c989fc6ab16b1951aed080e7d (patch)
tree9bc095b836b6d8405256aa43d2e5bdc9efff74d8 /pc.y
parent0f38c9398c21e756a834140fbe6f023de51ef527 (diff)
Add call gen_code from parser
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 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);