| 385 | |
| 386 | |
| 387 | static const char *min_expand(MatchState *ms, const char *s, |
| 388 | const char *p, const char *ep) { |
| 389 | for (;;) { |
| 390 | const char *res = match(ms, s, ep + 1); |
| 391 | if (res != nullptr) |
| 392 | return res; |
| 393 | else if (singlematch(ms, s, p, ep)) |
| 394 | s++; /* try with one more repetition */ |
| 395 | else return nullptr; |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | |
| 400 | static const char *start_capture(MatchState *ms, const char *s, |
no test coverage detected