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

Function f_parser

xrepo/packages/l/lua/port/lua/src/ldo.c:961–975  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

959
960
961static void f_parser (lua_State *L, void *ud) {
962 LClosure *cl;
963 struct SParser *p = cast(struct SParser *, ud);
964 int c = zgetc(p->z); /* read first character */
965 if (c == LUA_SIGNATURE[0]) {
966 checkmode(L, p->mode, "binary");
967 cl = luaU_undump(L, p->z, p->name);
968 }
969 else {
970 checkmode(L, p->mode, "text");
971 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
972 }
973 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
974 luaF_initupvals(L, cl);
975}
976
977
978int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 5

checkmodeFunction · 0.85
luaU_undumpFunction · 0.85
luaY_parserFunction · 0.85
luaF_initupvalsFunction · 0.85
castFunction · 0.50

Tested by

no test coverage detected