mirror of
https://github.com/boostorg/parser.git
synced 2026-02-02 21:12:13 +00:00
Remove the support for token_view::iterator -> underlying iterator translation
in *parse_impl(); add support to the error handlers and their support functions directly instead. There are simply too many APIs there that need the translation to leave it to other code. Add lex_error exception type, and add support for all the APIs that used to take a parse_error param to now take either a parse_error or a lex_error. Throw lex_error from failed parsing of lexed tokens in detail::make_token(). See #202.
This commit is contained in:
@@ -31,9 +31,9 @@ struct logging_error_handler
|
||||
// and rethrow. Returning fail fails the top-level parse; returning
|
||||
// rethrow just re-throws the parse_error exception that got us here in
|
||||
// the first place.
|
||||
template<typename Iter, typename Sentinel>
|
||||
template<typename Iter, typename Sentinel, template<class> class Exception>
|
||||
bp::error_handler_result
|
||||
operator()(Iter first, Sentinel last, bp::parse_error<Iter> const & e) const
|
||||
operator()(Iter first, Sentinel last, Exception<Iter> const & e) const
|
||||
{
|
||||
bp::write_formatted_expectation_failure_error_message(
|
||||
ofs_, filename_, first, last, e);
|
||||
|
||||
Reference in New Issue
Block a user