Working on parser refactor

This commit is contained in:
2026-04-29 14:36:42 +02:00
parent 1f40c8f5ee
commit eb4b0495f2
10 changed files with 253 additions and 138 deletions
+2 -2
View File
@@ -20,7 +20,7 @@ void log_error(const char* msg) {
}
}
void log_on_line(Location* loc, int to_column, const char* msg, ...) {
void log_on_line(Location* loc, const char* msg, ...) {
/* Declarations first for C89 */
char* line_prefix = NULL;
char* formatted_msg = NULL;
@@ -36,7 +36,7 @@ void log_on_line(Location* loc, int to_column, const char* msg, ...) {
line_prefix = format_string("%d| ", loc->line);
if (!line_prefix) goto cleanup;
caret_len = to_column - loc->column_start + 1;
caret_len = loc->column_end - loc->column_start + 1;
if (caret_len < 1) caret_len = 1;
/* Format the message */