diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-13 12:32:03 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-13 12:32:03 +0000 |
| commit | 17cec530b0a4d792bde2d37583b6c26e89f9b1bd (patch) | |
| tree | 6b67f23d68ccf21dd6052f858037be7b49244c4c /lib/Lexer/Lexer.cc | |
| parent | 42acac3dac5b8ff5aec4ff204d2c1da948ea34b0 (diff) | |
fix: distinguish compiler errors and report compilation termination
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Diffstat (limited to 'lib/Lexer/Lexer.cc')
| -rw-r--r-- | lib/Lexer/Lexer.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Lexer/Lexer.cc b/lib/Lexer/Lexer.cc index 6299371..4f7f997 100644 --- a/lib/Lexer/Lexer.cc +++ b/lib/Lexer/Lexer.cc @@ -25,7 +25,7 @@ int Lexer::gettok() { if (LastChar == '"') { LastChar = Input.get(); } else { - fprintf(stderr, "Error: Unterminated string literal at line %d\n", CurrentLine); + fprintf(stderr, "error: Unterminated string literal at line %d\n", CurrentLine); HadError = true; } @@ -35,7 +35,7 @@ int Lexer::gettok() { if (LastChar == '\'') { int CharCode = Input.get(); if (CharCode == EOF || CharCode == '\n') { - fprintf(stderr, "Error: Unterminated char literal at line %d\n", CurrentLine); + fprintf(stderr, "error: Unterminated char literal at line %d\n", CurrentLine); HadError = true; CharVal = '?'; StringVal.assign(1, CharVal); @@ -46,7 +46,7 @@ int Lexer::gettok() { int ClosingQuote = Input.get(); if (ClosingQuote != '\'') { - fprintf(stderr, "Error: CHAR literal must contain exactly one character (line %d)\n", CurrentLine); + fprintf(stderr, "error: CHAR literal must contain exactly one character (line %d)\n", CurrentLine); HadError = true; while (ClosingQuote != EOF && ClosingQuote != '\n' && ClosingQuote != '\'') { ClosingQuote = Input.get(); |
