MCPcopy Create free account
hub / github.com/docopt/docopt.cpp / maybe_collapse_to_required

Function maybe_collapse_to_required

docopt.cpp:421–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419}
420
421static std::shared_ptr<Pattern> maybe_collapse_to_required(PatternList&& seq)
422{
423 if (seq.size()==1) {
424 return std::move(seq[0]);
425 }
426 return std::make_shared<Required>(std::move(seq));
427}
428
429static std::shared_ptr<Pattern> maybe_collapse_to_either(PatternList&& seq)
430{

Callers 1

parse_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected