| 859 | |
| 860 | |
| 861 | static void lastlistfield (FuncState *fs, ConsControl *cc) { |
| 862 | if (cc->tostore == 0) return; |
| 863 | if (hasmultret(cc->v.k)) { |
| 864 | luaK_setmultret(fs, &cc->v); |
| 865 | luaK_setlist(fs, cc->t->u.info, cc->na, LUA_MULTRET); |
| 866 | cc->na--; /* do not count last expression (unknown number of elements) */ |
| 867 | } |
| 868 | else { |
| 869 | if (cc->v.k != VVOID) |
| 870 | luaK_exp2nextreg(fs, &cc->v); |
| 871 | luaK_setlist(fs, cc->t->u.info, cc->na, cc->tostore); |
| 872 | } |
| 873 | cc->na += cc->tostore; |
| 874 | } |
| 875 | |
| 876 | |
| 877 | static void listfield (LexState *ls, ConsControl *cc) { |
no test coverage detected