From 233dd92768a54060df9096558aa58c1f598cce7d Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Fri, 8 Apr 2022 18:49:40 -0300 Subject: Add rudimentary type checking --- src/parser.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/parser.h') diff --git a/src/parser.h b/src/parser.h index 3c2dc2b..cc3ba92 100644 --- a/src/parser.h +++ b/src/parser.h @@ -5,10 +5,15 @@ #include "nodes.h" #include "hashtable.h" +typedef struct Type { + StringView name; + size_t size; // (bytes) +} Type; + typedef struct Scope { struct Scope *parent; HashTable *symbols; - // HashTable types; + HashTable *types; } Scope; typedef struct ParseTree { -- cgit v1.2.1