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

Method SimplifyCharClass

extern/re2/re2/simplify.cc:653–663  ·  view source on GitHub ↗

Simplifies a character class. Caller must Decref return value when done with it.

Source from the content-addressed store, hash-verified

651// Simplifies a character class.
652// Caller must Decref return value when done with it.
653Regexp* SimplifyWalker::SimplifyCharClass(Regexp* re) {
654 CharClass* cc = re->cc();
655
656 // Special cases
657 if (cc->empty())
658 return new Regexp(kRegexpNoMatch, re->parse_flags());
659 if (cc->full())
660 return new Regexp(kRegexpAnyChar, re->parse_flags());
661
662 return re->Incref();
663}
664
665} // namespace re2

Callers

nothing calls this directly

Calls 5

parse_flagsMethod · 0.80
ccMethod · 0.45
emptyMethod · 0.45
fullMethod · 0.45
IncrefMethod · 0.45

Tested by

no test coverage detected