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

Function lastlistfield

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

Source from the content-addressed store, hash-verified

473
474
475static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
476 if (cc->tostore == 0) return;
477 if (hasmultret(cc->v.k)) {
478 luaK_setmultret(fs, &cc->v);
479 luaK_setlist(fs, cc->t->u.s.info, cc->na, LUA_MULTRET);
480 cc->na--; /* do not count last expression (unknown number of elements) */
481 }
482 else {
483 if (cc->v.k != VVOID)
484 luaK_exp2nextreg(fs, &cc->v);
485 luaK_setlist(fs, cc->t->u.s.info, cc->na, cc->tostore);
486 }
487}
488
489
490static void listfield (LexState *ls, struct ConsControl *cc) {

Callers 1

constructorFunction · 0.70

Calls 2

luaK_setlistFunction · 0.70
luaK_exp2nextregFunction · 0.70

Tested by

no test coverage detected