MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / DebugString

Method DebugString

extern/re2/re2/prefilter.cc:664–697  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662}
663
664std::string Prefilter::DebugString() const {
665 switch (op_) {
666 default:
667 LOG(DFATAL) << "Bad op in Prefilter::DebugString: " << op_;
668 return StringPrintf("op%d", op_);
669 case NONE:
670 return "*no-matches*";
671 case ATOM:
672 return atom_;
673 case ALL:
674 return "";
675 case AND: {
676 std::string s = "";
677 for (size_t i = 0; i < subs_->size(); i++) {
678 if (i > 0)
679 s += " ";
680 Prefilter* sub = (*subs_)[i];
681 s += sub ? sub->DebugString() : "<nil>";
682 }
683 return s;
684 }
685 case OR: {
686 std::string s = "(";
687 for (size_t i = 0; i < subs_->size(); i++) {
688 if (i > 0)
689 s += "|";
690 Prefilter* sub = (*subs_)[i];
691 s += sub ? sub->DebugString() : "<nil>";
692 }
693 s += ")";
694 return s;
695 }
696 }
697}
698
699Prefilter* Prefilter::FromRE2(const RE2* re2) {
700 if (re2 == NULL)

Callers 1

ToStringMethod · 0.80

Calls 2

StringPrintfFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected