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

Function prefix_parse

include/boost/parser/parser.hpp:9295–9323  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9293 detail::is_equality_comparable_with_v<I, S>>>
9294#endif
9295 auto prefix_parse(
9296 I & first,
9297 S last,
9298 parser_interface<Parser, GlobalState, ErrorHandler> const & parser,
9299 trace trace_mode = trace::off)
9300 {
9301 if constexpr (!detail::is_char8_iter_v<I>) {
9302 if (trace_mode == trace::on) {
9303 return detail::parse_impl<(true && BOOST_PARSER_DO_TRACE)>(
9304 first, last, parser, parser.error_handler_);
9305 } else {
9306 return detail::parse_impl<false>(
9307 first, last, parser, parser.error_handler_);
9308 }
9309 } else {
9310 auto r =
9311 BOOST_PARSER_SUBRANGE(first, last) | detail::text::as_utf32;
9312 auto f = r.begin();
9313 auto const l = r.end();
9314 auto _ = detail::scoped_base_assign(first, f);
9315 if (trace_mode == trace::on) {
9316 return detail::parse_impl<(true && BOOST_PARSER_DO_TRACE)>(
9317 f, l, parser, parser.error_handler_);
9318 } else {
9319 return detail::parse_impl<false>(
9320 f, l, parser, parser.error_handler_);
9321 }
9322 }
9323 }
9324
9325 /** Parses `r` using `parser`. Returns a `std::optional` containing the
9326 attribute produced by `parser` on parse success, and `std::nullopt` on

Callers 15

json.cppFile · 0.85
callback_json.cppFile · 0.85
mainFunction · 0.85
compile_or_attributeFunction · 0.85
mainFunction · 0.85
compile_attributeFunction · 0.85
mainFunction · 0.85
compile_seq_attributeFunction · 0.85

Calls 4

scoped_base_assignClass · 0.85
has_attributeFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected