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

Function start_capture

third-party/lua-5.2.4/src/lstrlib.c:374–385  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

372
373
374static const char *start_capture (MatchState *ms, const char *s,
375 const char *p, int what) {
376 const char *res;
377 int level = ms->level;
378 if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
379 ms->capture[level].init = s;
380 ms->capture[level].len = what;
381 ms->level = level+1;
382 if ((res=match(ms, s, p)) == NULL) /* match failed? */
383 ms->level--; /* undo capture */
384 return res;
385}
386
387
388static 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