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

Function luaD_protectedparser

third-party/lua-5.2.4/src/ldo.c:662–679  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660
661
662int luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
663 const char *mode) {
664 struct SParser p;
665 int status;
666 L->nny++; /* cannot yield during parsing */
667 p.z = z; p.name = name; p.mode = mode;
668 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
669 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
670 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
671 luaZ_initbuffer(L, &p.buff);
672 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top), L->errfunc);
673 luaZ_freebuffer(L, &p.buff);
674 luaM_freearray(L, p.dyd.actvar.arr, p.dyd.actvar.size);
675 luaM_freearray(L, p.dyd.gt.arr, p.dyd.gt.size);
676 luaM_freearray(L, p.dyd.label.arr, p.dyd.label.size);
677 L->nny--;
678 return status;
679}
680
681

Callers 1

lua_loadFunction · 0.70

Calls 1

luaD_pcallFunction · 0.70

Tested by

no test coverage detected