MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / removevars

Function removevars

3rd/lua-5.4.3/src/lparser.c:328–335  ·  view source on GitHub ↗

** Close the scope for all variables up to level 'tolevel'. ** (debug info.) */

Source from the content-addressed store, hash-verified

326** (debug info.)
327*/
328static void removevars (FuncState *fs, int tolevel) {
329 fs->ls->dyd->actvar.n -= (fs->nactvar - tolevel);
330 while (fs->nactvar > tolevel) {
331 LocVar *var = localdebuginfo(fs, --fs->nactvar);
332 if (var) /* does it have debug information? */
333 var->endpc = fs->pc;
334 }
335}
336
337
338/*

Callers 1

leaveblockFunction · 0.85

Calls 1

localdebuginfoFunction · 0.85

Tested by

no test coverage detected