hachem.wtf
aboutsummaryrefslogtreecommitdiff
path: root/src/diag.c
diff options
context:
space:
mode:
authorhachem <im@hachem.wtf>2026-10-12 11:41:05 +0200
committerhachem <im@hachem.wtf>2026-10-12 11:41:05 +0200
commit62636576bce8e8121a3d70f63547fae40a52f697 (patch)
tree077dfe4f04235cce63b7abb1b05bb539232ae74a /src/diag.c
parentc0f000ea166a24781fcdbf23c080b203cd9b8ed7 (diff)
chore: refactor
Diffstat (limited to 'src/diag.c')
-rw-r--r--src/diag.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/diag.c b/src/diag.c
index 6962046..cb1a057 100644
--- a/src/diag.c
+++ b/src/diag.c
@@ -30,10 +30,10 @@ void report_error(struct Source source, struct Token token, const char* message)
if (span == 0)
span = 1;
- const char* bold = colored() ? "\033[1m" : "";
+ const char* bold = colored() ? "\033[1m" : "";
const char* red = colored() ? "\033[31m" : "";
const char* blue = colored() ? "\033[34m" : "";
- const char* reset = colored() ? "\033[0m" : "";
+ const char* reset = colored() ? "\033[0m" : "";
int gutter = snprintf(NULL, 0, "%u", token.line);
@@ -55,9 +55,9 @@ void report_error(struct Source source, struct Token token, const char* message)
void report_error_message(const char* message)
{
- const char* bold = colored() ? "\033[1m" : "";
+ const char* bold = colored() ? "\033[1m" : "";
const char* red = colored() ? "\033[31m" : "";
- const char* reset = colored() ? "\033[0m" : "";
+ const char* reset = colored() ? "\033[0m" : "";
fprintf(stderr, "%s%serror:%s %s%s%s\n", bold, red, reset, bold, message, reset);
}