diff options
Diffstat (limited to 'src/compiler/error_helper')
-rw-r--r-- | src/compiler/error_helper/error_helper.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/compiler/error_helper/error_helper.c b/src/compiler/error_helper/error_helper.c index 42e3745..e307c91 100644 --- a/src/compiler/error_helper/error_helper.c +++ b/src/compiler/error_helper/error_helper.c @@ -16,12 +16,13 @@ void printError(char const *error, SourceCode *sourceCode, char const *begin, for (size_t i = 0; i < sourceCode->size; ++i) { const Code *source = sourceCode->codes[i]; - if (source->code <= begin && strlen(source->code)+source->code >= end) { + if (source->code <= begin && strlen(source->code) + source->code >= end) { code = source; } } if (code == NULL) { - fprintf(stderr, "Bad Error: the error is in no source code\n"); + fprintf(stderr, + "Compiler Internal Error: the error is in no source code\n"); return; } @@ -33,9 +34,7 @@ void printError(char const *error, SourceCode *sourceCode, char const *begin, const char c = *iter; switch (c) { case '\0': - fprintf(stderr, - "Compiler Internal Error: in printing errors at compiler %s:%d", - __FILE_NAME__, __LINE__); + fprintf(stderr, "Compiler Internal Error: in printing errors\n"); exit(1); case '\n': lineBegin = iter + 1; |