From acc33ffeb8f5eae5e6bb805f1cb409841f0aad75 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 31 Mar 2024 03:09:06 -0400 Subject: Tenative tokenizer --- tnslc/compile/error.tnsl | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tnslc/compile/error.tnsl (limited to 'tnslc/compile/error.tnsl') diff --git a/tnslc/compile/error.tnsl b/tnslc/compile/error.tnsl new file mode 100644 index 0000000..7857075 --- /dev/null +++ b/tnslc/compile/error.tnsl @@ -0,0 +1,14 @@ + +~uint8 ERR_NUM = ":%d\0" +~uint8 TOK_PRNT = " \"%s\": \0" + +/; report_error (utils.File file, Token token, ~uint8 message) + ~uint s = file.path.to_cstr('/') + _printf(s) + _print_num(ERR_NUM, token.line) + _print_num(ERR_NUM, token.col) + _print_num(TOK_PRNT, token.data) + _printf(message) + _printf(newline) +;/ + -- cgit v1.2.3