From 065d60fc962136d03a8a74eb235901aa14d87593 Mon Sep 17 00:00:00 2001 From: Quinn Stephens Date: Mon, 9 Jun 2025 21:49:07 -0400 Subject: parser: Store symbols in a hashmap Signed-off-by: Quinn Stephens --- include/parser.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/parser.h') diff --git a/include/parser.h b/include/parser.h index d0dadbe..a362613 100644 --- a/include/parser.h +++ b/include/parser.h @@ -30,11 +30,13 @@ #ifndef _PARSER_H #define _PARSER_H 1 +#include "hashmap.h" #include "lexer.h" struct parser { struct lexer *lexer; struct token tok; + struct hashmap syms; }; static inline bool @@ -43,6 +45,6 @@ parser_advance(struct parser *ctx) return lexer_next(ctx->lexer, &ctx->tok); } -bool parser_parse(struct lexer *lexer); +bool parser_parse(struct parser *ctx); #endif /* !_PARSER_H */ -- cgit v1.2.3