MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / start_capture

Function start_capture

src/Chain/libraries/glua/lstrlib.cpp:400–411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399
400static const char *start_capture(MatchState *ms, const char *s,
401 const char *p, int what) {
402 const char *res;
403 int level = ms->level;
404 if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
405 ms->capture[level].init = s;
406 ms->capture[level].len = what;
407 ms->level = level + 1;
408 if ((res = match(ms, s, p)) == nullptr) /* match failed? */
409 ms->level--; /* undo capture */
410 return res;
411}
412
413
414static 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