Massaging error messages
This commit is contained in:
@@ -26,7 +26,7 @@ print_token_line(Token *token){
|
||||
function void
|
||||
print_token_context(Token *token){
|
||||
if(!token) return;
|
||||
printf(" :: tdi:%u %s:%d\n", token->di, token->file.str, (S32)token->line + 1);
|
||||
printf("\n");
|
||||
print_token_line(token);
|
||||
}
|
||||
|
||||
@@ -50,6 +50,9 @@ compiler_error(Token *token1, Token *token2, const char *str, ...){
|
||||
print_token_context(token2);
|
||||
}
|
||||
|
||||
if(token1) printf("\n%s:%d token_di:%u", token1->file.str, (S32)token1->line + 1, token1->di);
|
||||
if(token2) printf("\n%s:%d token_di:%u", token2->file.str, (S32)token2->line + 1, token2->di);
|
||||
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
@@ -66,6 +69,9 @@ compiler_error(Token *token, const char *str, ...){
|
||||
|
||||
print_token_context(token);
|
||||
}
|
||||
|
||||
if(token) printf("\n%s:%d token_di:%u", token->file.str, (S32)token->line + 1, token->di);
|
||||
|
||||
__debugbreak();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user