aboutsummaryrefslogtreecommitdiff
path: root/parts/toklist.h
diff options
context:
space:
mode:
authorkartofen <kartofen.mail.0@protonmail.com>2025-07-20 01:32:24 +0300
committerkartofen <kartofen.mail.0@protonmail.com>2025-07-20 01:32:24 +0300
commit34357640c0676f33ad13aac1fe28effc6f6e47c7 (patch)
treed656ee61da7d7a0b133aa57311266653ef100569 /parts/toklist.h
parent174e9b35ce3b6e99e500907f1bb24c6f31f481bf (diff)
start of grammar parsing
Diffstat (limited to 'parts/toklist.h')
-rw-r--r--parts/toklist.h5
1 files changed, 3 insertions, 2 deletions
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 <stdint.h> // 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