MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / f_parser

Function f_parser

lib/lua/src/ldo.c:992–1006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990
991
992static void f_parser (lua_State *L, void *ud) {
993 LClosure *cl;
994 struct SParser *p = cast(struct SParser *, ud);
995 int c = zgetc(p->z); /* read first character */
996 if (c == LUA_SIGNATURE[0]) {
997 checkmode(L, p->mode, "binary");
998 cl = luaU_undump(L, p->z, p->name);
999 }
1000 else {
1001 checkmode(L, p->mode, "text");
1002 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
1003 }
1004 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
1005 luaF_initupvals(L, cl);
1006}
1007
1008
1009int 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