| 977 | |
| 978 | |
| 979 | static void breakstat (LexState *ls) { |
| 980 | FuncState *fs = ls->fs; |
| 981 | BlockCnt *bl = fs->bl; |
| 982 | int upval = 0; |
| 983 | while (bl && !bl->isbreakable) { |
| 984 | upval |= bl->upval; |
| 985 | bl = bl->previous; |
| 986 | } |
| 987 | if (!bl) |
| 988 | luaX_syntaxerror(ls, "no loop to break"); |
| 989 | if (upval) |
| 990 | luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0); |
| 991 | luaK_concat(fs, &bl->breaklist, luaK_jump(fs)); |
| 992 | } |
| 993 | |
| 994 | |
| 995 | static void whilestat (LexState *ls, int line) { |
no test coverage detected