diff options
author | Tucker Evans <tuckerevans24@gmail.com> | 2019-08-17 11:34:48 -0400 |
---|---|---|
committer | Tucker Evans <tuckerevans24@gmail.com> | 2019-08-17 11:34:48 -0400 |
commit | 06ebf6a87ca1db975bdbf4f7f3126ea7c26ddde6 (patch) | |
tree | 03215f60ea0c776e60f38288470dac10546ad501 /pc.y | |
parent | ee6c598892518d956388bb008095de6d4d7fe123 (diff) |
Add basic type checking
Squashed commit of WIP-type_check@5dadc4f5667ae69a709dd45c020780f2f424d67e
Diffstat (limited to 'pc.y')
-rw-r--r-- | pc.y | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1,6 +1,7 @@ %{ #include <stdlib.h> #include <stddef.h> +#include <assert.h> #include "node.h" #include "scope.h" @@ -92,6 +93,7 @@ program compound_statement '.' { + set_ret_type($9); print_tree($9); } ; @@ -158,6 +160,7 @@ sub_prog_declaration sub_prog_declarations compound_statement { + set_ret_type($4); print_tree($4); pop_scope(&cur_scope); } |