MCPcopy Create free account
hub / github.com/defold/defold / f_parser

Function f_parser

engine/lua/src/lua/ldo.c:490–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

luaZ_lookaheadFunction · 0.85
luaF_newLclosureFunction · 0.85
gtFunction · 0.85
luaF_newupvalFunction · 0.85

Tested by

no test coverage detected