Home | History | Annotate | Download | only in src

Lines Matching defs:capture

376   } capture[LUA_MAXCAPTURES];
397 ms->capture[l].len == CAP_UNFINISHED))
398 return luaL_error(ms->L, "invalid capture index %%%d", l + 1);
406 if (ms->capture[level].len == CAP_UNFINISHED) return level;
407 return luaL_error(ms->L, "invalid pattern capture");
547 ms->capture[level].init = s;
548 ms->capture[level].len = what;
551 ms->level--; /* undo capture */
560 ms->capture[l].len = s - ms->capture[l].init; /* close capture */
562 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */
570 len = ms->capture[l].len;
572 memcmp(ms->capture[l].init, s, len) == 0)
584 case '(': { /* start capture */
585 if (*(p + 1) == ')') /* position capture? */
591 case ')': { /* end capture */
626 case '8': case '9': { /* capture results (%0-%9)? */
704 ** get information about the i-th capture. If there are no captures
706 ** is the range 's'..'e'. If the capture is a string, return
714 luaL_error(ms->L, "invalid capture index %%%d", i + 1);
719 ptrdiff_t capl = ms->capture[i].len;
720 *cap = ms->capture[i].init;
722 luaL_error(ms->L, "unfinished capture");
724 lua_pushinteger(ms->L, (ms->capture[i].init - ms->src_init) + 1);
731 ** Push the i-th capture on the stack.
926 push_onecapture(ms, 0, s, e); /* first capture is the index */