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

Function lastlistfield

third-party/lua-5.5.0/src/lparser.c:967–980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965
966
967static void lastlistfield (FuncState *fs, ConsControl *cc) {
968 if (cc->tostore == 0) return;
969 if (hasmultret(cc->v.k)) {
970 luaK_setmultret(fs, &cc->v);
971 luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET);
972 cc->na--; /* do not count last expression (unknown number of elements) */
973 }
974 else {
975 if (cc->v.k != VVOID)
976 luaK_exp2nextreg(fs, &cc->v);
977 luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore);
978 }
979 cc->na += cc->tostore;
980}
981
982
983static 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