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

Function github_issue_285

test/github_issues.cpp:479–502  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

477}
478
479void github_issue_285()
480{
481 using namespace github_issue_285_;
482 namespace bp = boost::parser;
483
484 constexpr auto prolog = bp::lit(U"prolog") >> bp::eol;
485
486 constexpr auto epilog =
487 bp::no_case[bp::lexeme[bp::lit(U"epi") >> bp::lit(U"log")]] >> bp::eol;
488
489 constexpr auto full_parser = prolog >> content >> epilog;
490
491 std::string teststring =
492 "prolog\n"
493 "content\n"
494 "epilog\n";
495
496 // "content" produces a shared_ptr with the result.
497 // The "epilog" parser must not delete the result.
498
499 auto const result = bp::parse(teststring, full_parser, bp::blank);
500 BOOST_TEST(result);
501 BOOST_TEST(result.value().get() != nullptr);
502}
503
504void github_pr_290()
505{

Callers 1

mainFunction · 0.85

Calls 4

litFunction · 0.85
parseFunction · 0.50
getMethod · 0.45
valueMethod · 0.45

Tested by

no test coverage detected