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

Function start_capture

third-party/lua-5.3.5/src/lstrlib.c:389–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

387
388
389static const char *start_capture (MatchState *ms, const char *s,
390 const char *p, int what) {
391 const char *res;
392 int level = ms->level;
393 if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
394 ms->capture[level].init = s;
395 ms->capture[level].len = what;
396 ms->level = level+1;
397 if ((res=match(ms, s, p)) == NULL) /* match failed? */
398 ms->level--; /* undo capture */
399 return res;
400}
401
402
403static 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