MCPcopy Create free account
hub / github.com/danomatika/ofxLua / f_parser

Function f_parser

libs/lua/ldo.c:988–1002  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

986
987
988static void f_parser (lua_State *L, void *ud) {
989 LClosure *cl;
990 struct SParser *p = cast(struct SParser *, ud);
991 int c = zgetc(p->z); /* read first character */
992 if (c == LUA_SIGNATURE[0]) {
993 checkmode(L, p->mode, "binary");
994 cl = luaU_undump(L, p->z, p->name);
995 }
996 else {
997 checkmode(L, p->mode, "text");
998 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
999 }
1000 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
1001 luaF_initupvals(L, cl);
1002}
1003
1004
1005int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,

Callers

nothing calls this directly

Calls 4

checkmodeFunction · 0.85
luaU_undumpFunction · 0.85
luaY_parserFunction · 0.85
luaF_initupvalsFunction · 0.85

Tested by

no test coverage detected