Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
parser: Refactor to pass translated STL strings to parser::lineno_str…
…ing() Passing translated strings instead of translatable strings makes a bunch of things easier: * We don't need to worry about forgetting to call gettext _() in lineno_string() (which, as a matter of fact, I forgot to do for hint_string, oops) * We can append and preprend stuff to the *translated* strings before passing to lineno_string() without breaking localization! Woo! Using STL strings instead of C strings also makes things easier and prettier. The negligible performance impact shouldn't be a concern here because landing in parser::lineno_string() or parser::error() is a worst-case situation since it only happens when the parser encounters an error and cannot continue. Also, parser::lineno_string() now takes an optional fifth argument with the tokenizer state message to append to the end of the full message and trail. We need that for the next commit.
- Loading branch information