diff options
| author | hachem <im@hachem.wtf> | 2026-10-12 11:41:05 +0200 |
|---|---|---|
| committer | hachem <im@hachem.wtf> | 2026-10-12 11:41:05 +0200 |
| commit | 62636576bce8e8121a3d70f63547fae40a52f697 (patch) | |
| tree | 077dfe4f04235cce63b7abb1b05bb539232ae74a /src/diag.c | |
| parent | c0f000ea166a24781fcdbf23c080b203cd9b8ed7 (diff) | |
chore: refactor
Diffstat (limited to 'src/diag.c')
| -rw-r--r-- | src/diag.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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); } |
