aboutsummaryrefslogtreecommitdiffhomepage
path: root/lex.h
diff options
context:
space:
mode:
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 *);