From 9812f88a9a612144bea02c7acf499867eb0cbeb9 Mon Sep 17 00:00:00 2001 From: lemon Date: Mon, 13 Oct 2025 19:06:52 +0200 Subject: implement most of preprocessor - concatenation (##) - builtin macros (__FILE__ etc) - fails in some edge cases, and code needs cleanup - add embedded system include files (stddef.h, stdarg.h for now) - can handle stdio.h now --- lex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lex.h') diff --git a/lex.h b/lex.h index 515613f..3c1d431 100644 --- a/lex.h +++ b/lex.h @@ -95,6 +95,7 @@ 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); -void initlexer(struct lexer *, const struct span *span, const char *file, struct arena **tmparena); +const char *initlexer(struct lexer *, const struct span *span, const char *file); +void lexerfreetemps(struct lexer *); /* vim:set ts=3 sw=3 expandtab: */ -- cgit v1.2.3