mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-12-16 03:08:52 +08:00
Generate error message in `parse_something()`, not in `lex_something`. Since the error message generated by `lex_something` is too difficult to read for humans, I've disabled the error message generation for the sake of efficiency (it takes time to generate error message that will never be read). I think now the error message generation itself safely can be removed from combinators. At this stage, `lex_something` does not need to return `result<T, E>` because all the error type would be discarded. Now it is turned out that returing `optional<T>` from lex_* is enough. Maybe later I would change the return type itself, but currently I changed the error type from std::string to char because implementing optional takes time and effort. It makes the parsing process a bit faster.