From d9ba5ec2f86dd69eae4edac586a889fccd8d31b1 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Sat, 27 Jul 2019 13:26:15 -0400 Subject: Fix typos & errors --- main.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index 3d1401c..fbd96d0 100644 --- a/main.c +++ b/main.c @@ -2,6 +2,8 @@ #include #include +#include "node.h" +#include "scope.h" #include "y.tab.h" #include "pc.h" -- cgit v1.1 From 60507214c098beaf3ae01a202e564bfe2f7c8364 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Sat, 27 Jul 2019 21:08:22 -0400 Subject: Add basic scoping --- main.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'main.c') diff --git a/main.c b/main.c index fbd96d0..dba3b7f 100644 --- a/main.c +++ b/main.c @@ -10,6 +10,8 @@ extern char *yytext; extern int line_num; +scope *cur_scope; + char* pretty_type(t) int t; { @@ -136,6 +138,9 @@ char* msg; int main() { + cur_scope = mkscope(); + assert(cur_scope); + yyparse(); return 0; -- cgit v1.1