diff options
| author | 2022-08-15 12:22:47 +0200 | |
|---|---|---|
| committer | 2022-08-15 12:22:47 +0200 | |
| commit | f906d0b350b0b4ceb747669c9a9845d11bd0e486 (patch) | |
| tree | 5f09a7b714e6ce93f6094a06e5f736513110fb8d /src/util.cff | |
| parent | f802bb99263aaa5be492999babd44cd2fdb1c65f (diff) | |
self hosted progress
Diffstat (limited to 'src/util.cff')
| -rw-r--r-- | src/util.cff | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/src/util.cff b/src/util.cff index 1b81ab4..d3e40bb 100644 --- a/src/util.cff +++ b/src/util.cff @@ -67,24 +67,13 @@ extern fn addfilepath(s *const u8) int { return i; } -fn fileid2path(id int) *const u8 { +extern fn fileid2path(id int) *const u8 { assert(id >= 0 and id < filepaths.#len, "fileid"); let s = filepaths[id]; assert(s != #null, "fileid"); return s; } -extern fn fatal(P *Parser, loc Loc, fmt *const u8, ...) void { - let ap va_list #?; - ap->start(fmt); - - efmt("%s:%i:%i: error: ", fileid2path(loc.fileid), loc.line, loc.col); - vefmt(fmt, ap); - efmt("\n"); - ap->end(); - exit(1); -} - extern fn internstr(s *const u8) *const u8 { static set Set<*const u8, struct { fn hash(s *const u8) u32 { return fnv1a_s(FNV1A_INI, s); } |