aboutsummaryrefslogtreecommitdiffstats
path: root/src/parser.h
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2022-04-06 22:02:55 -0300
committerBad Diode <bd@badd10de.dev>2022-04-06 22:02:55 -0300
commit8186228baa8a4e646e2f11c0dbbf6a023079f8eb (patch)
tree56387d7a0fc52b2b9691c6d01202b2fb6338b77a /src/parser.h
parent725ba80c048069d15b2668ad0fa0e123819ec410 (diff)
downloadbdl-8186228baa8a4e646e2f11c0dbbf6a023079f8eb.tar.gz
bdl-8186228baa8a4e646e2f11c0dbbf6a023079f8eb.zip
Add initial implementation of symbol checking
Diffstat (limited to 'src/parser.h')
-rw-r--r--src/parser.h9
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
8typedef struct Scope {
9 struct Scope *parent;
10 HashTable *symbols;
11 // HashTable types;
12} Scope;
6 13
7typedef struct ParseTree { 14typedef struct ParseTree {
8 Node **roots; 15 Node **roots;
16 Scope *global_scope;
17 Scope *current_scope;
9} ParseTree; 18} ParseTree;
10 19
11typedef struct Parser { 20typedef struct Parser {