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

Function localfunc

third-party/lua-5.1.5/src/lparser.c:1165–1176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1163
1164
1165static void localfunc (LexState *ls) {
1166 expdesc v, b;
1167 FuncState *fs = ls->fs;
1168 new_localvar(ls, str_checkname(ls), 0);
1169 init_exp(&v, VLOCAL, fs->freereg);
1170 luaK_reserveregs(fs, 1);
1171 adjustlocalvars(ls, 1);
1172 body(ls, &b, 0, ls->linenumber);
1173 luaK_storevar(fs, &v, &b);
1174 /* debug information will only see the variable after this point! */
1175 getlocvar(fs, fs->nactvar - 1).startpc = fs->pc;
1176}
1177
1178
1179static void localstat (LexState *ls) {

Callers 1

statementFunction · 0.70

Calls 8

new_localvarFunction · 0.70
str_checknameFunction · 0.70
init_expFunction · 0.70
luaK_reserveregsFunction · 0.70
adjustlocalvarsFunction · 0.70
bodyFunction · 0.70
luaK_storevarFunction · 0.70
getlocvarFunction · 0.50

Tested by

no test coverage detected