MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / f_parser

Function f_parser

lua/ldo.c:498–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

496};
497
498static void f_parser (lua_State *L, void *ud) {
499 int i;
500 Proto *tf;
501 Closure *cl;
502 struct SParser *p = cast(struct SParser *, ud);
503 int c = luaZ_lookahead(p->z);
504 luaC_checkGC(L);
505 tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z,
506 &p->buff, p->name);
507 cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L)));
508 cl->l.p = tf;
509 for (i = 0; i < tf->nups; i++) /* initialize eventual upvalues */
510 cl->l.upvals[i] = luaF_newupval(L);
511 setclvalue(L, L->top, cl);
512 incr_top(L);
513}
514
515
516int luaD_protectedparser (lua_State *L, ZIO *z, const char *name) {

Callers

nothing calls this directly

Calls 3

luaZ_lookaheadFunction · 0.85
luaF_newLclosureFunction · 0.85
luaF_newupvalFunction · 0.85

Tested by

no test coverage detected