MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / start_capture

Function start_capture

extlibs/lua/src/lstrlib.c:531–542  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

529
530
531static const char *start_capture (MatchState *ms, const char *s,
532 const char *p, int what) {
533 const char *res;
534 int level = ms->level;
535 if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
536 ms->capture[level].init = s;
537 ms->capture[level].len = what;
538 ms->level = level+1;
539 if ((res=match(ms, s, p)) == NULL) /* match failed? */
540 ms->level--; /* undo capture */
541 return res;
542}
543
544
545static const char *end_capture (MatchState *ms, const char *s,

Callers 1

matchFunction · 0.85

Calls 2

luaL_errorFunction · 0.85
matchFunction · 0.70

Tested by

no test coverage detected