summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWormHeamer2025-10-27 23:33:50 -0400
committerWormHeamer2025-10-27 23:33:50 -0400
commit4e333d90d4838f630bd84470b557154b6d32d0d3 (patch)
treecc842a1799a8dd338b16577771d39e9d85ccaffd
parent40d164972423056e8302bd67db9494b6e4b076b3 (diff)
move lex_tok_str to lex.c
-rw-r--r--lex.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lex.c b/lex.c
index 733fb52..cfdb552 100644
--- a/lex.c
+++ b/lex.c
@@ -5,6 +5,12 @@
#include "arena.h"
#include "strio.h"
+static const char *lex_tok_str[TOK_MAX] = {
+#define X(n, s) s,
+ LEX_TOK_LIST
+#undef X
+};
+
void lex_start(Lexer *l, const char *path) {
l->ofs = 0;
l->filename = str_dup(str_from_cstr(path), &l->arena);