Token refactor and better logs

This commit is contained in:
2026-04-24 20:28:08 +02:00
parent da3425ec10
commit 451a9a2a22
9 changed files with 210 additions and 122 deletions
+12
View File
@@ -19,3 +19,15 @@ static void test_log_error(void) {
log_set_output(NULL); // Reset to default
}
static void test_log_on_line(void) {
const char* expected =
"--- test.c ---\n"
"1| int main() []\n"
" ^^\n"
" unexpected token\n";
log_on_line("test.c", "int main() []", 1, 12, 13, "unexpected token");
assert_log(expected, "expected formatted error message");
}