aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorTucker Evans <tuckerevans24@gmail.com>2019-07-27 21:08:22 -0400
committerTucker Evans <tuckerevans24@gmail.com>2019-07-27 21:08:22 -0400
commit60507214c098beaf3ae01a202e564bfe2f7c8364 (patch)
treef189004a59cf1a19a743469a92f996f7615cdc02 /main.c
parentd9ba5ec2f86dd69eae4edac586a889fccd8d31b1 (diff)
Add basic scoping
Diffstat (limited to 'main.c')
-rw-r--r--main.c5
1 files changed, 5 insertions, 0 deletions
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;