aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.h
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-10-18 18:12:19 +0200
committerlemon <lsof@mailbox.org>2025-10-18 18:12:19 +0200
commit99adb48d94c59cb2e5701ca39d7c40d4f63459b3 (patch)
treebe3c432db54dd7f4e1ceab70848543bba1a4ead8 /lex.h
parentffca6b54a9654005a121c3557bb8b245ae65ce55 (diff)
#pragma once
Diffstat (limited to 'lex.h')
-rw-r--r--lex.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lex.h b/lex.h
index 6adbad9..20fb2ee 100644
--- a/lex.h
+++ b/lex.h
@@ -98,11 +98,17 @@ struct lexer {
struct arena **tmparena;
};
+enum initlexer {
+ LXOK,
+ LXFILESEEN,
+ LXERR,
+};
+
const char *intern(const char *);
int lex(struct lexer *, struct token *);
int lexpeek(struct lexer *, struct token *);
enum typetag parsenumlit(uvlong *, double *, const struct token *, bool ispp);
-const char *initlexer(struct lexer *, const struct span *span, const char *file);
+enum initlexer initlexer(struct lexer *, const char **err, const char *file);
void lexerdump(struct lexer *, struct wbuf *out);
void lexerfreetemps(struct lexer *);