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

Function lastlistfield

third-party/lua-5.4.6/src/lparser.c:879–892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

877
878
879static void lastlistfield (FuncState *fs, ConsControl *cc) {
880 if (cc->tostore == 0) return;
881 if (hasmultret(cc->v.k)) {
882 luaK_setmultret(fs, &cc->v);
883 luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);
884 cc->na--; /* do not count last expression (unknown number of elements) */
885 }
886 else {
887 if (cc->v.k != VVOID)
888 luaK_exp2nextreg(fs, &cc->v);
889 luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);
890 }
891 cc->na += cc->tostore;
892}
893
894
895static void listfield (LexState *ls, ConsControl *cc) {

Callers 1

constructorFunction · 0.70

Calls 2

luaK_setlistFunction · 0.70
luaK_exp2nextregFunction · 0.70

Tested by

no test coverage detected