DEADSOFTWARE

Добавлены строки в отладочную информацию класса (быстрохак)
[dsw-obn.git] / src / oberon-common.c
index f1b67112f251d8a0e368aa52d1e78ed16d3c90ef..997b7d250bc9d8f8fe5b21af8ac50513f824b7e7 100644 (file)
@@ -2,8 +2,6 @@
 #include <stdlib.h>
 #include <stdarg.h>
 
-#include "../include/oberon.h"
-
 #include "oberon-internals.h"
 
 void
@@ -11,12 +9,9 @@ oberon_error(oberon_context_t * ctx, const char * fmt, ...)
 {
         va_list ptr;
         va_start(ptr, fmt);
-        fprintf(stderr, "error: ");
-        vfprintf(stderr, fmt, ptr);
-        fprintf(stderr, "\n");
-        fprintf(stderr, "  code_index = %i\n", ctx -> code_index);
-        fprintf(stderr, "  c          = %c\n", ctx -> c);
-        fprintf(stderr, "  token      = %i\n", ctx -> token);
+        printf("%s: (%i:%i) ", ctx -> loc.source, ctx -> loc.line, ctx -> loc.col);
+        vprintf(fmt, ptr);
+        printf("\n");
         va_end(ptr);
         exit(1);
 }