MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / f_parser

Function f_parser

src/Chain/libraries/glua/ldo.cpp:797–811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795
796
797static void f_parser(lua_State *L, void *ud) {
798 LClosure *cl;
799 struct SParser *p = lua_cast(struct SParser *, ud);
800 int c = zgetc(p->z); /* read first character */
801 if (c == LUA_SIGNATURE[0]) {
802 checkmode(L, p->mode, "binary");
803 cl = luaU_undump(L, p->z, p->name);
804 }
805 else {
806 checkmode(L, p->mode, "text");
807 cl = luaY_parser(L, p->z, &p->buff, &p->dyd, p->name, c);
808 }
809 lua_assert(cl->nupvalues == cl->p->sizeupvalues);
810 luaF_initupvals(L, cl);
811}
812
813
814int 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