MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / breakstat

Function breakstat

Source/Misc/lua/src/lua.c:8551–8564  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

repeatstatFunction · 0.85
statementFunction · 0.85

Calls 4

luaX_syntaxerrorFunction · 0.85
luaK_codeABCFunction · 0.85
luaK_concatFunction · 0.85
luaK_jumpFunction · 0.85

Tested by

no test coverage detected