From d028cc9c04cf46256166434bdea68d5f5c6d310f Mon Sep 17 00:00:00 2001 From: kartofen Date: Tue, 8 Jul 2025 18:25:29 +0300 Subject: simple calculator example --- parts/toklist.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'parts/toklist.h') diff --git a/parts/toklist.h b/parts/toklist.h index f32cd25..760846f 100644 --- a/parts/toklist.h +++ b/parts/toklist.h @@ -5,10 +5,10 @@ struct token; -// /*extern*/ struct token *toklist_eat(); -// /*extern*/ struct token *toklist_peek(); +symbol token_sym(struct token *t); // UB for NULL +int token_val(struct token *t); // UB for NULL -symbol toklist_eat(); -symbol toklist_peek(); +struct token *toklist_eat(); // always non-NULL +struct token *toklist_peek(); // always non-NULL #endif -- cgit v1.2.3