MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / start_capture

Function start_capture

third-party/lua-5.5.0/src/lstrlib.c:536–547  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

matchFunction · 0.70

Calls 2

luaL_errorFunction · 0.70
matchFunction · 0.70

Tested by

no test coverage detected