| 548 | |
| 549 | |
| 550 | static const char *end_capture (MatchState *ms, const char *s, |
| 551 | const char *p) { |
| 552 | int l = capture_to_close(ms); |
| 553 | const char *res; |
| 554 | ms->capture[l].len = s - ms->capture[l].init; /* close capture */ |
| 555 | if ((res = match(ms, s, p)) == NULL) /* match failed? */ |
| 556 | ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ |
| 557 | return res; |
| 558 | } |
| 559 | |
| 560 | |
| 561 | static const char *match_capture (MatchState *ms, const char *s, int l) { |
no test coverage detected