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

Method FinishRegexp

extern/re2/re2/parse.cc:220–233  ·  view source on GitHub ↗

Finishes the regexp if necessary, preparing it for use in a more complex expression. If it is a CharClassBuilder, converts into a CharClass.

Source from the content-addressed store, hash-verified

218// a more complex expression.
219// If it is a CharClassBuilder, converts into a CharClass.
220Regexp* Regexp::ParseState::FinishRegexp(Regexp* re) {
221 if (re == NULL)
222 return NULL;
223 re->down_ = NULL;
224
225 if (re->op_ == kRegexpCharClass && re->ccb_ != NULL) {
226 CharClassBuilder* ccb = re->ccb_;
227 re->ccb_ = NULL;
228 re->cc_ = ccb->GetCharClass();
229 delete ccb;
230 }
231
232 return re;
233}
234
235// Pushes the given regular expression onto the stack.
236// Could check for too much memory used here.

Callers

nothing calls this directly

Calls 1

GetCharClassMethod · 0.80

Tested by

no test coverage detected