MCPcopy Create free account
hub / github.com/boostorg/parser / action_parser

Class action_parser

include/boost/parser/parser.hpp:4689–4774  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4687
4688 template<typename Parser, typename Action>
4689 struct action_parser
4690 {
4691 template<
4692 typename Iter,
4693 typename Sentinel,
4694 typename Context,
4695 typename SkipParser>
4696 detail::nope call(
4697 Iter & first,
4698 Sentinel last,
4699 Context const & context,
4700 SkipParser const & skip,
4701 detail::flags flags,
4702 bool & success) const
4703 {
4704 detail::nope retval;
4705 call(first, last, context, skip, flags, success, retval);
4706 return retval;
4707 }
4708
4709 template<
4710 typename Iter,
4711 typename Sentinel,
4712 typename Context,
4713 typename SkipParser,
4714 typename Attribute>
4715 void call(
4716 Iter & first,
4717 Sentinel last,
4718 Context const & context,
4719 SkipParser const & skip,
4720 detail::flags flags,
4721 bool & success,
4722 Attribute & retval) const
4723 {
4724#if BOOST_PARSER_DO_TRACE
4725 [[maybe_unused]] auto _ = detail::scoped_trace(
4726 *this, first, last, context, flags, retval);
4727#endif
4728
4729 auto const initial_first = first;
4730 auto attr = parser_.call(
4731 first,
4732 last,
4733 context,
4734 skip,
4735 detail::enable_attrs(flags),
4736 success);
4737
4738 if (!success)
4739 return;
4740
4741 if constexpr (detail::action_assignable_to_val_apply<
4742 decltype(action_) &,
4743 decltype(attr),
4744 decltype(context)>()) {
4745 _val(context) = detail::hl::apply(action_, std::move(attr));
4746 } else {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected