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

Function lastlistfield

third-party/lua-5.3.5/src/lparser.c:678–690  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676
677
678static void lastlistfield (FuncState *fs, struct ConsControl *cc) {
679 if (cc->tostore == 0) return;
680 if (hasmultret(cc->v.k)) {
681 luaK_setmultret(fs, &cc->v);
682 luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);
683 cc->na--; /* do not count last expression (unknown number of elements) */
684 }
685 else {
686 if (cc->v.k != VVOID)
687 luaK_exp2nextreg(fs, &cc->v);
688 luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);
689 }
690}
691
692
693static 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