MCPcopy Create free account
hub / github.com/F-Stack/f-stack / singlevar

Function singlevar

freebsd/contrib/openzfs/module/lua/lparser.c:295–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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