diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-27 21:08:22 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-07-27 21:08:22 -0400 |
commit | 60507214c098beaf3ae01a202e564bfe2f7c8364 (patch) | |
tree | f189004a59cf1a19a743469a92f996f7615cdc02 /pc.l | |
parent | d9ba5ec2f86dd69eae4edac586a889fccd8d31b1 (diff) |
Add basic scoping
Diffstat (limited to 'pc.l')
-rw-r--r-- | pc.l | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,9 +1,11 @@ %{ - +#include "node.h" +#include "scope.h" #include "y.tab.h" #include "pc.h" int line_num=1; +extern scope *cur_scope; %} @@ -39,13 +41,13 @@ id [A-Za-z][A-Za-z0-9_]* "procedure" { debug_print(PROC, NULL); - /*s = push_scope(s);*/ + push_scope(&cur_scope); return PROC; } "function" { debug_print(FUNC, NULL); - /*s = push_scope(s);*/ + push_scope(&cur_scope); return FUNC; } |