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

Function new_localvar

third-party/lua-5.2.4/src/lparser.c:178–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176
177
178static void new_localvar (LexState *ls, TString *name) {
179 FuncState *fs = ls->fs;
180 Dyndata *dyd = ls->dyd;
181 int reg = registerlocalvar(ls, name);
182 checklimit(fs, dyd->actvar.n + 1 - fs->firstlocal,
183 MAXVARS, "local variables");
184 luaM_growvector(ls->L, dyd->actvar.arr, dyd->actvar.n + 1,
185 dyd->actvar.size, Vardesc, MAX_INT, "local variables");
186 dyd->actvar.arr[dyd->actvar.n++].idx = cast(short, reg);
187}
188
189
190static void new_localvarliteral_ (LexState *ls, const char *name, size_t sz) {

Callers 6

new_localvarliteral_Function · 0.70
parlistFunction · 0.70
fornumFunction · 0.70
forlistFunction · 0.70
localfuncFunction · 0.70
localstatFunction · 0.70

Calls 2

registerlocalvarFunction · 0.70
checklimitFunction · 0.70

Tested by

no test coverage detected