summaryrefslogtreecommitdiff
path: root/tnslc/compile/error.tnsl
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-03-31 03:09:06 -0400
committerKyle Gunger <kgunger12@gmail.com>2024-03-31 03:09:06 -0400
commitacc33ffeb8f5eae5e6bb805f1cb409841f0aad75 (patch)
tree5801ecf64408ba281362310b325c80ca1f028b20 /tnslc/compile/error.tnsl
parentd90f254a65e7443e7d6ee7d4a3e89df21bdd4e8c (diff)
Tenative tokenizer
Diffstat (limited to 'tnslc/compile/error.tnsl')
-rw-r--r--tnslc/compile/error.tnsl14
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)
+;/
+