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

Function f_parser

Source/Misc/lua/src/lua.c:5636–5651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5634};
5635
5636static void f_parser (lua_State *L, void *ud) {
5637int i;
5638Proto *tf;
5639Closure *cl;
5640struct SParser *p = cast(struct SParser *, ud);
5641int c = luaZ_lookahead(p->z);
5642luaC_checkGC(L);
5643tf = ((c == LUA_SIGNATURE[0]) ? luaU_undump : luaY_parser)(L, p->z,
5644&p->buff, p->name);
5645cl = luaF_newLclosure(L, tf->nups, hvalue(gt(L)));
5646cl->l.p = tf;
5647for (i = 0; i < tf->nups; i++) /* initialize eventual upvalues */
5648cl->l.upvals[i] = luaF_newupval(L);
5649setclvalue(L, L->top, cl);
5650incr_top(L);
5651}
5652
5653
5654int 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