aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2022-04-08 18:49:40 -0300
committerBad Diode <bd@badd10de.dev>2022-04-08 18:49:40 -0300
commit233dd92768a54060df9096558aa58c1f598cce7d (patch)
tree70cad899ab9767e6cc069192a763e2c0354b9f3f /src/parser.h
parent55ecfb3b7713172f76ddbff022fa4d6a80d0661a (diff)
downloadbdl-233dd92768a54060df9096558aa58c1f598cce7d.tar.gz
bdl-233dd92768a54060df9096558aa58c1f598cce7d.zip
Add rudimentary type checking
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h7
1 files changed, 6 insertions, 1 deletions
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 @@
5#include "nodes.h" 5#include "nodes.h"
6#include "hashtable.h" 6#include "hashtable.h"
7 7
8typedef struct Type {
9 StringView name;
10 size_t size; // (bytes)
11} Type;
12
8typedef struct Scope { 13typedef struct Scope {
9 struct Scope *parent; 14 struct Scope *parent;
10 HashTable *symbols; 15 HashTable *symbols;
11 // HashTable types; 16 HashTable *types;
12} Scope; 17} Scope;
13 18
14typedef struct ParseTree { 19typedef struct ParseTree {