From 1eb17cda6780476b166b55d0fedc3ad355969e87 Mon Sep 17 00:00:00 2001 From: lemon Date: Fri, 12 Aug 2022 16:43:06 +0200 Subject: selfhosted lexer --- src/all.hff | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/all.hff') diff --git a/src/all.hff b/src/all.hff index a35694b..e090570 100644 --- a/src/all.hff +++ b/src/all.hff @@ -81,6 +81,7 @@ struct Tok { flo f64, bool bool, str [#]const u8, + ident *const u8, }, } @@ -104,15 +105,19 @@ extern fn parse(*Parser) [#]Decl; // util.cff extern fn xmalloc(n usize) *void; +extern fn xcalloc(n usize, m usize) *void; extern fn xrealloc(p *void, n usize) *void; +extern fn xstrdup(str *const u8) *u8; def FNV1A_INI u32 = 0x811c9dc5; extern fn fnv1a(h u32, [#]const u8) u32; extern fn fnv1a_s(h u32, *const u8) u32; extern fn addfilepath(*const u8) int; extern fn fatal(*Parser, Loc, fmt *const u8, ...) void; +extern fn internstr(*const u8) *const u8; // fmt.cff extern fn vpfmt(proc *fn(u8, *void) void, parg *void, fmt *const u8, va_list) void; +extern fn pfmt(proc *fn(u8, *void) void, parg *void, fmt *const u8, ...) void; extern fn vefmt(fmt *const u8, ap va_list) void; extern fn efmt(fmt *const u8, ...) void; -- cgit v1.2.3