mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-09 03:46:46 +00:00
parser: Print location and preprocessor substitution trail when skipping BOMs
Example: > 20140222 08:42:34 error config: Skipping over a utf8 BOM at campaigns/Heir_To_The_Throne/_main.cfg:1 > included from _main.cfg:24
This commit is contained in:
parent
64930edbe4
commit
bbdb45c237
@ -124,7 +124,13 @@ void parser::operator()()
|
||||
static_cast<unsigned char>(tok_->next_token().value[0]) == 0xBB &&
|
||||
static_cast<unsigned char>(tok_->next_token().value[0]) == 0xBF)
|
||||
{
|
||||
ERR_CF << "Skipping over a utf8 BOM\n";
|
||||
utils::string_map i18n_symbols;
|
||||
std::stringstream ss;
|
||||
ss << tok_->get_start_line() << " " << tok_->get_file();
|
||||
ERR_CF << lineno_string(i18n_symbols,
|
||||
ss.str(),
|
||||
"Skipping over a utf8 BOM at $pos")
|
||||
<< '\n';
|
||||
} else {
|
||||
error(_("Unexpected characters at line start"));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user