summaryrefslogtreecommitdiff
path: root/util/err.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/err.c')
-rw-r--r--util/err.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/util/err.c b/util/err.c
new file mode 100644
index 0000000..62886c4
--- /dev/null
+++ b/util/err.c
@@ -0,0 +1,10 @@
+typedef uint32_t LineNo;
+
+static void err_print(LineNo line, LineNo col, const char *fmt, ...) {
+ /* TODO: Color */
+ va_list args;
+ fprintf(stderr, "Error at line %lu col %lu:\n", (unsigned long)line, (unsigned long)col);
+ va_start(args, fmt);
+ vfprintf(stderr, fmt, args);
+ va_end(args);
+}