summaryrefslogtreecommitdiff
path: root/include/lex.h
diff options
context:
space:
mode:
author0x221e2026-06-15 21:12:35 +0200
committer0x221e2026-06-16 02:19:01 +0200
commitaab8263f58be6479cc73033a745459849fba7f0a (patch)
tree10c1b871c38c8c97a8f70ef20d418ae20d974221 /include/lex.h
parent56796c08d6388ad0eb0539d166cd12964cfeb7e9 (diff)
lex: add lex_get_token_name()
Add lex_get_token_name() to lex/lex.c and refactor platform/elf/main.c so that it prints the token identifier string rather than int.
Diffstat (limited to 'include/lex.h')
-rw-r--r--include/lex.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/lex.h b/include/lex.h
index a712204..4b8b1ac 100644
--- a/include/lex.h
+++ b/include/lex.h
@@ -31,6 +31,8 @@
#define TOKEN_STAR 23
#define TOKEN_SLASH 24
+const char* lex_get_token_name(int id);
+
struct token {
int type;
// size_t line;