MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / breakstat

Function breakstat

lua/lparser.c:1035–1048  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1033
1034
1035static 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
1051static 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