mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-07 01:51:14 -03:00
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:
@@ -24,10 +24,13 @@ enum token_type {
|
||||
};
|
||||
|
||||
struct tokenizer_error {
|
||||
const wchar_t *Message;
|
||||
private:
|
||||
const wchar_t *_message;
|
||||
public:
|
||||
const wchar_t *Message() const;
|
||||
enum parse_error_code_t parser_error; //the parser error associated with this tokenizer error
|
||||
tokenizer_error(const wchar_t *msg, enum parse_error_code_t perr = parse_error_tokenizer_other)
|
||||
: Message(msg), parser_error(perr) {}
|
||||
: _message(msg), parser_error(perr) {}
|
||||
tokenizer_error(const tokenizer_error&) = delete;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user