Restore localization to tokenizer error strings

Work around #4810 by retrieving localizations at runtime to avoid issues
possibly caused by inserting into the static unordered_map during static
initialization.

Closes #810.
This commit is contained in:
Mahmoud Al-Qudsi
2018-03-13 13:45:15 -05:00
parent 054bc88b82
commit 1441cca9c5
3 changed files with 22 additions and 15 deletions

View File

@@ -671,7 +671,7 @@ void parse_ll_t::report_tokenizer_error(const tokenizer_t &tokenizer, const tok_
parse_error_code_t parse_error_code = tok.error->parser_error;
this->parse_error_at_location(tok.offset, tok.length, tok.offset + tok.error_offset,
parse_error_code, L"%ls",
tok.error->Message);
tok.error->Message());
}
void parse_ll_t::parse_error_unexpected_token(const wchar_t *expected, parse_token_t token) {