| 8549 | |
| 8550 | |
| 8551 | static void breakstat (LexState *ls) { |
| 8552 | FuncState *fs = ls->fs; |
| 8553 | BlockCnt *bl = fs->bl; |
| 8554 | int upval = 0; |
| 8555 | while (bl && !bl->isbreakable) { |
| 8556 | upval |= bl->upval; |
| 8557 | bl = bl->previous; |
| 8558 | } |
| 8559 | if (!bl) |
| 8560 | luaX_syntaxerror(ls, "no loop to break"); |
| 8561 | if (upval) |
| 8562 | luaK_codeABC(fs, OP_CLOSE, bl->nactvar, 0, 0); |
| 8563 | luaK_concat(fs, &bl->breaklist, luaK_jump(fs)); |
| 8564 | } |
| 8565 | |
| 8566 | |
| 8567 | static void whilestat (LexState *ls, int line) { |
no test coverage detected