4.4.1
|
|
Freundlich's C++ toolkit |
Converts the success value of a parser into either another success value or an error.
If the parser p returns s, then convert(p,f)
returns f(s)
, which can either be a success or an error value. Errors returned by p remain unchanged.
Result | The success type of this parser. |
Public Types | |
using | result_type = Result |
using | function_type = fcppt::function< fcppt::either::object< fcppt::parse::custom_error< Ch >, result_type >(fcppt::parse::position< Ch >, fcppt::parse::result_of< Parser > &&)> |
Public Member Functions | |
convert_if (Parser &&, function_type &&) | |
template<typename Skipper > | |
fcppt::parse::result< Ch, result_type > | parse (fcppt::reference< fcppt::parse::basic_stream< Ch > >, Skipper const &) const |
using fcppt::parse::convert_if< Ch, Parser, Result >::function_type = fcppt::function<fcppt::either::object<fcppt::parse::custom_error<Ch>, result_type>( fcppt::parse::position<Ch>, fcppt::parse::result_of<Parser> &&)> |
using fcppt::parse::convert_if< Ch, Parser, Result >::result_type = Result |
fcppt::parse::convert_if< Ch, Parser, Result >::convert_if | ( | Parser && | , |
function_type && | |||
) |
fcppt::parse::result< Ch, result_type > fcppt::parse::convert_if< Ch, Parser, Result >::parse | ( | fcppt::reference< fcppt::parse::basic_stream< Ch > > | , |
Skipper const & | |||
) | const |