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

Function f_parser

third-party/lua-5.4.6/src/ldo.c:999–1013  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

997
998
999static void f_parser (lua_State *L, void *ud) {
1000 LClosure *cl;
1001 struct SParser *p = cast(struct SParser *, ud);
1002 int c = zgetc(p->z); /* read first character */
1003 if (c == LUA_SIGNATURE[0]) {
1004 checkmode(L, p->mode, "binary");
1005 cl = luaU_undump(L, p->z, p->name);
1006 }
1007 else {
1008 checkmode(L, p->mode, "text");
1009 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
1010 }
1011 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
1012 luaF_initupvals(L, cl);
1013}
1014
1015
1016int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 4

checkmodeFunction · 0.70
luaU_undumpFunction · 0.70
luaY_parserFunction · 0.70
luaF_initupvalsFunction · 0.70

Tested by

no test coverage detected