Change to be an if + panic instead of an assert

This commit is contained in:
gingerBill
2026-06-09 17:20:20 +01:00
parent 52c609e161
commit e9c477d9fc

View File

@@ -1918,7 +1918,9 @@ gb_internal void assign_removal_flag_to_semicolon(AstFile *f) {
prev_token = &prev_token_;
curr_token = &curr_token_;
}
GB_ASSERT_MSG(prev_token->kind == Token_Semicolon, "got: %.*s", LIT(prev_token->string));
if (prev_token->kind != Token_Semicolon) {
GB_PANIC("Expected a semicolon, got %.*s", LIT(prev_token->string));
}
if (prev_token->string != ";") {
return;
}