MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / luaD_protectedparser

Function luaD_protectedparser

src/ldo.cpp:1157–1174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1155
1156
1157TStatus luaD_protectedparser (lua_State *L, ZIO *z, const char *name,
1158 const char *mode) {
1159 struct SParser p;
1160 TStatus status;
1161 incnny(L); /* cannot yield during parsing */
1162 p.z = z; p.name = name; p.mode = mode;
1163 p.dyd.actvar.arr = NULL; p.dyd.actvar.size = 0;
1164 p.dyd.gt.arr = NULL; p.dyd.gt.size = 0;
1165 p.dyd.label.arr = NULL; p.dyd.label.size = 0;
1166 luaZ_initbuffer(L, &p.buff);
1167 status = luaD_pcall(L, f_parser, &p, savestack(L, L->top.p), L->errfunc);
1168 luaZ_freebuffer(L, &p.buff);
1169 luaM_freearray(L, p.dyd.actvar.arr, cast_sizet(p.dyd.actvar.size));
1170 luaM_freearray(L, p.dyd.gt.arr, cast_sizet(p.dyd.gt.size));
1171 luaM_freearray(L, p.dyd.label.arr, cast_sizet(p.dyd.label.size));
1172 decnny(L);
1173 return status;
1174}
1175
1176

Callers 1

lua_loadFunction · 0.85

Calls 1

luaD_pcallFunction · 0.85

Tested by

no test coverage detected