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

Function maybe_collapse_to_either

docopt.cpp:429–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

427}
428
429static std::shared_ptr<Pattern> maybe_collapse_to_either(PatternList&& seq)
430{
431 if (seq.size()==1) {
432 return std::move(seq[0]);
433 }
434 return std::make_shared<Either>(std::move(seq));
435}
436
437PatternList parse_expr(Tokens& tokens, std::vector<Option>& options)
438{

Callers 1

parse_exprFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected