MCPcopy Create free account
hub / github.com/F-Stack/f-stack / breakstat

Function breakstat

app/redis-6.2.6/deps/lua/src/lparser.c:979–992  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

977
978
979static 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
995static void whilestat (LexState *ls, int line) {

Callers 2

repeatstatFunction · 0.85
statementFunction · 0.85

Calls 4

luaX_syntaxerrorFunction · 0.70
luaK_codeABCFunction · 0.70
luaK_concatFunction · 0.70
luaK_jumpFunction · 0.70

Tested by

no test coverage detected