272 {
273 if (pending_empty_) {
274 pending_empty_ = false;
275 return true;
276 }
277 RegExpTree* atom;
278 if (characters_ != nullptr) {
280
281
282 ZoneGrowableArray<uint16_t>* char_vector =
283 new (
Z) ZoneGrowableArray<uint16_t>();
284 char_vector->AddArray(*characters_);
285 intptr_t num_chars = char_vector->length();
286 if (num_chars > 1) {
287 ZoneGrowableArray<uint16_t>*
prefix =
288 new (
Z) ZoneGrowableArray<uint16_t>();
289 for (intptr_t
i = 0;
i < num_chars - 1;
i++) {
290 prefix->Add(char_vector->At(
i));
291 }
292 text_.Add(
new (
Z) RegExpAtom(
prefix, flags_));
293 ZoneGrowableArray<uint16_t>*
tail =
new (
Z) ZoneGrowableArray<uint16_t>();
294 tail->Add(char_vector->At(num_chars - 1));
296 }
297 characters_ = nullptr;
298 atom =
new (
Z) RegExpAtom(char_vector, flags_);
299 FlushText();
300 } else if (text_.length() > 0) {
302 atom = text_.RemoveLast();
303 FlushText();
304 } else if (terms_.length() > 0) {
306 atom = terms_.RemoveLast();
307 if (auto lookaround = atom->AsLookaround()) {
308
309 if (is_unicode()) return false;
310
312 return false;
313 }
314 }
315 if (atom->max_match() == 0) {
316
319 return true;
320 }
321 terms_.Add(atom);
322 return true;
323 }
324 } else {
325
327 }
328 terms_.Add(
new (
Z) RegExpQuantifier(
min,
max, quantifier_type, atom));
330 return true;
331}
#define DEBUG_ASSERT(cond)
static float max(float r, float g, float b)
static float min(float r, float g, float b)