MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / start_capture

Function start_capture

Source/Misc/lua/src/lua.c:14006–14017  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14004
14005
14006static const char *start_capture (MatchState *ms, const char *s,
14007const char *p, int what) {
14008const char *res;
14009int level = ms->level;
14010if (level >= LUA_MAXCAPTURES) luaL_error(ms->L, "too many captures");
14011ms->capture[level].init = s;
14012ms->capture[level].len = what;
14013ms->level = level+1;
14014if ((res=match(ms, s, p)) == NULL) /* match failed? */
14015ms->level--; /* undo capture */
14016return res;
14017}
14018
14019
14020static const char *end_capture (MatchState *ms, const char *s,

Callers 1

matchFunction · 0.85

Calls 2

luaL_errorFunction · 0.85
matchFunction · 0.85

Tested by

no test coverage detected