From 8186228baa8a4e646e2f11c0dbbf6a023079f8eb Mon Sep 17 00:00:00 2001 From: Bad Diode Date: Wed, 6 Apr 2022 22:02:55 -0300 Subject: Add initial implementation of symbol checking --- src/parser.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/parser.h') 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 @@ #include "lexer.h" #include "nodes.h" +#include "hashtable.h" + +typedef struct Scope { + struct Scope *parent; + HashTable *symbols; + // HashTable types; +} Scope; typedef struct ParseTree { Node **roots; + Scope *global_scope; + Scope *current_scope; } ParseTree; typedef struct Parser { -- cgit v1.2.1