MCPcopy Create free account
hub / github.com/F-Stack/f-stack / f_parser

Function f_parser

freebsd/contrib/openzfs/module/lua/ldo.c:715–729  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

713
714
715static void f_parser (lua_State *L, void *ud) {
716 int i;
717 Closure *cl;
718 struct SParser *p = cast(struct SParser *, ud);
719 int c = zgetc(p->z); /* read first character */
720 lua_assert(c != LUA_SIGNATURE[0]); /* binary not supported */
721 checkmode(L, p->mode, "text");
722 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
723 lua_assert(cl->l.nupvalues == cl->l.p->sizeupvalues);
724 for (i = 0; i < cl->l.nupvalues; i++) { /* initialize upvalues */
725 UpVal *up = luaF_newupval(L);
726 cl->l.upvals[i] = up;
727 luaC_objbarrier(L, cl, up);
728 }
729}
730
731
732int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 3

checkmodeFunction · 0.85
luaY_parserFunction · 0.70
luaF_newupvalFunction · 0.70

Tested by

no test coverage detected