diff options
| author | 2025-10-13 19:06:52 +0200 | |
|---|---|---|
| committer | 2025-10-13 19:09:48 +0200 | |
| commit | 9812f88a9a612144bea02c7acf499867eb0cbeb9 (patch) | |
| tree | 0575b7c6b6b72b0683c4ffae108292b3d44998be /lex.h | |
| parent | 3048a0b59baae16727d0c259353ff4be1ae559b4 (diff) | |
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
Diffstat (limited to 'lex.h')
| -rw-r--r-- | lex.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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: */ |