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

Function f_parser

third-party/lua-5.1.5/src/ldo.c:491–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

luaZ_lookaheadFunction · 0.85
luaF_newLclosureFunction · 0.70
luaF_newupvalFunction · 0.70

Tested by

no test coverage detected