| 965 | |
| 966 | |
| 967 | static 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 | |
| 983 | static void listfield (LexState *ls, ConsControl *cc) { |
no test coverage detected