diff options
author | Bad Diode <bd@badd10de.dev> | 2022-04-06 22:02:55 -0300 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2022-04-06 22:02:55 -0300 |
commit | 8186228baa8a4e646e2f11c0dbbf6a023079f8eb (patch) | |
tree | 56387d7a0fc52b2b9691c6d01202b2fb6338b77a /src/parser.h | |
parent | 725ba80c048069d15b2668ad0fa0e123819ec410 (diff) | |
download | bdl-8186228baa8a4e646e2f11c0dbbf6a023079f8eb.tar.gz bdl-8186228baa8a4e646e2f11c0dbbf6a023079f8eb.zip |
Add initial implementation of symbol checking
Diffstat (limited to 'src/parser.h')
-rw-r--r-- | src/parser.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/parser.h b/src/parser.h index 4d871ad..3c2dc2b 100644 --- a/src/parser.h +++ b/src/parser.h | |||
@@ -3,9 +3,18 @@ | |||
3 | 3 | ||
4 | #include "lexer.h" | 4 | #include "lexer.h" |
5 | #include "nodes.h" | 5 | #include "nodes.h" |
6 | #include "hashtable.h" | ||
7 | |||
8 | typedef struct Scope { | ||
9 | struct Scope *parent; | ||
10 | HashTable *symbols; | ||
11 | // HashTable types; | ||
12 | } Scope; | ||
6 | 13 | ||
7 | typedef struct ParseTree { | 14 | typedef struct ParseTree { |
8 | Node **roots; | 15 | Node **roots; |
16 | Scope *global_scope; | ||
17 | Scope *current_scope; | ||
9 | } ParseTree; | 18 | } ParseTree; |
10 | 19 | ||
11 | typedef struct Parser { | 20 | typedef struct Parser { |