MCPcopy Create free account
hub / github.com/DFHack/dfhack / f_parser

Function f_parser

depends/lua/src/ldo.c:766–780  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

764
765
766static void f_parser (lua_State *L, void *ud) {
767 LClosure *cl;
768 struct SParser *p = cast(struct SParser *, ud);
769 int c = zgetc(p->z); /* read first character */
770 // if (c == LUA_SIGNATURE[0]) {
771 // checkmode(L, p->mode, "binary");
772 // cl = luaU_undump(L, p->z, p->name);
773 // }
774 // else {
775 checkmode(L, p->mode, "text");
776 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
777 // }
778 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
779 luaF_initupvals(L, cl);
780}
781
782
783int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 4

castFunction · 0.85
checkmodeFunction · 0.85
luaY_parserFunction · 0.85
luaF_initupvalsFunction · 0.85

Tested by

no test coverage detected