| 878 | |
| 879 | |
| 880 | static 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 | |
| 896 | static void listfield (LexState *ls, ConsControl *cc) { |
no test coverage detected