diff options
Diffstat (limited to 'tnslc/compile/error.tnsl')
-rw-r--r-- | tnslc/compile/error.tnsl | 14 |
1 files changed, 14 insertions, 0 deletions
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) +;/ + |