| 1033 | |
| 1034 | |
| 1035 | static void breakstat (LexState *ls) { |
| 1036 | FuncState *fs = ls->fs; |
| 1037 | BlockCnt *bl = fs->bl; |
| 1038 | int upval = 0; |
| 1039 | while (bl && !bl->isbreakable) { |
| 1040 | upval |= bl->upval; |
| 1041 | bl = bl->previous; |
| 1042 | } |
| 1043 | if (!bl) |
| 1044 | luaX_syntaxerror(ls, "no loop to break"); |
| 1045 | if (upval) |
| 1046 | luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0); |
| 1047 | luaK_concat(fs, &bl->breaklist, luaK_jump(fs)); |
| 1048 | } |
| 1049 | |
| 1050 | |
| 1051 | static void whilestat (LexState *ls, int line) { |
no test coverage detected