MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / end_capture

Function end_capture

Source/Misc/lua/src/lua.c:14020–14028  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14018
14019
14020static const char *end_capture (MatchState *ms, const char *s,
14021const char *p) {
14022int l = capture_to_close(ms);
14023const char *res;
14024ms->capture[l].len = s - ms->capture[l].init; /* close capture */
14025if ((res = match(ms, s, p)) == NULL) /* match failed? */
14026ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
14027return res;
14028}
14029
14030
14031static const char *match_capture (MatchState *ms, const char *s, int l) {

Callers 1

matchFunction · 0.85

Calls 2

capture_to_closeFunction · 0.85
matchFunction · 0.85

Tested by

no test coverage detected