MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / singlevar

Function singlevar

src/Chain/libraries/glua/lparser.cpp:318–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

316
317
318static void singlevar(LexState *ls, expdesc *var) {
319 TString *varname = str_checkname(ls);
320 FuncState *fs = ls->fs;
321 if (singlevaraux(fs, varname, var, 1) == VVOID) { /* global name? */
322 expdesc key;
323 singlevaraux(fs, ls->envn, var, 1); /* get environment variable */
324 lua_assert(var->k == VLOCAL || var->k == VUPVAL);
325 codestring(ls, &key, varname); /* key is variable name */
326 luaK_indexed(fs, var, &key); /* env[varname] */
327 }
328}
329
330
331static void adjust_assign(LexState *ls, int nvars, int nexps, expdesc *e) {

Callers 2

primaryexpFunction · 0.85
funcnameFunction · 0.85

Calls 4

str_checknameFunction · 0.85
singlevarauxFunction · 0.85
codestringFunction · 0.85
luaK_indexedFunction · 0.85

Tested by

no test coverage detected