From 06ebf6a87ca1db975bdbf4f7f3126ea7c26ddde6 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Sat, 17 Aug 2019 11:34:48 -0400 Subject: Add basic type checking Squashed commit of WIP-type_check@5dadc4f5667ae69a709dd45c020780f2f424d67e --- tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tree.h') diff --git a/tree.h b/tree.h index 0d94f6d..94ccb7d 100644 --- a/tree.h +++ b/tree.h @@ -12,6 +12,7 @@ typedef struct parse_tree { MULOP: MUL DIV */ } attr; + int ret_type; struct parse_tree *l, *r; } ptree; @@ -25,5 +26,6 @@ ptree* mkrnum(float); ptree* mkop(int, int, ptree*, ptree*); void update_type_info(ptree*, int); +void set_ret_type(ptree*); #endif -- cgit v1.1 From 3f1cee416602070225b81deb8c2222a5324f8204 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Sun, 18 Aug 2019 18:31:36 -0400 Subject: Fix clean up header includes --- tree.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'tree.h') diff --git a/tree.h b/tree.h index 94ccb7d..23edf8f 100644 --- a/tree.h +++ b/tree.h @@ -1,6 +1,8 @@ #ifndef TREE_H #define TREE_H +#include "node.h" + typedef struct parse_tree { int type; union { -- cgit v1.1