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

Function lastlistfield

third-party/lua-5.2.4/src/lparser.c:684–696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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