aboutsummaryrefslogtreecommitdiff
path: root/src/all.hff
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2022-08-12 16:43:06 +0200
committerlemon <lsof@mailbox.org>2022-08-12 16:43:06 +0200
commit1eb17cda6780476b166b55d0fedc3ad355969e87 (patch)
treeccb4ffa74cc37f24e93d4325ccf395d3fe73529f /src/all.hff
parentf14aee6184568bae34f8d8d8f9140fa760099fa5 (diff)
selfhosted lexer
Diffstat (limited to 'src/all.hff')
-rw-r--r--src/all.hff5
1 files changed, 5 insertions, 0 deletions
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;