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

Function singlevar

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

Source from the content-addressed store, hash-verified

295
296
297static void singlevar (LexState *ls, expdesc *var) {
298 TString *varname = str_checkname(ls);
299 FuncState *fs = ls->fs;
300 if (singlevaraux(fs, varname, var, 1) == VVOID) { /* global name? */
301 expdesc key;
302 singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
303 lua_assert(var->k == VLOCAL || var->k == VUPVAL);
304 codestring(ls, &key, varname); /* key is variable name */
305 luaK_indexed(fs, var, &key); /* env[varname] */
306 }
307}
308
309
310static void adjust_assign (LexState *ls, int nvars, int nexps, expdesc *e) {

Callers 2

primaryexpFunction · 0.70
funcnameFunction · 0.70

Calls 4

str_checknameFunction · 0.70
singlevarauxFunction · 0.70
codestringFunction · 0.70
luaK_indexedFunction · 0.70

Tested by

no test coverage detected