From 34357640c0676f33ad13aac1fe28effc6f6e47c7 Mon Sep 17 00:00:00 2001 From: kartofen Date: Sun, 20 Jul 2025 01:32:24 +0300 Subject: start of grammar parsing --- parts/toklist.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'parts/toklist.h') diff --git a/parts/toklist.h b/parts/toklist.h index 760846f..08fce66 100644 --- a/parts/toklist.h +++ b/parts/toklist.h @@ -1,12 +1,13 @@ #ifndef TOKLIST_H #define TOKLIST_H +#include // intptr_t #include "symbol.h" struct token; -symbol token_sym(struct token *t); // UB for NULL -int token_val(struct token *t); // UB for NULL +symbol token_sym(struct token *t); // t != NULL +intptr_t token_val(struct token *t); // t != NULL struct token *toklist_eat(); // always non-NULL struct token *toklist_peek(); // always non-NULL -- cgit v1.2.3