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