MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / lastlistfield

Function lastlistfield

lib/lua/src/lparser.c:880–893  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

constructorFunction · 0.85

Calls 2

luaK_setlistFunction · 0.85
luaK_exp2nextregFunction · 0.85

Tested by

no test coverage detected