MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / whilestat

Function whilestat

third-party/lua-5.2.4/src/lparser.c:1233–1249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1231
1232
1233static void whilestat (LexState *ls, int line) {
1234 /* whilestat -> WHILE cond DO block END */
1235 FuncState *fs = ls->fs;
1236 int whileinit;
1237 int condexit;
1238 BlockCnt bl;
1239 luaX_next(ls); /* skip WHILE */
1240 whileinit = luaK_getlabel(fs);
1241 condexit = cond(ls);
1242 enterblock(fs, &bl, 1);
1243 checknext(ls, TK_DO);
1244 block(ls);
1245 luaK_jumpto(fs, whileinit);
1246 check_match(ls, TK_END, TK_WHILE, line);
1247 leaveblock(fs);
1248 luaK_patchtohere(fs, condexit); /* false conditions finish the loop */
1249}
1250
1251
1252static void repeatstat (LexState *ls, int line) {

Callers 1

statementFunction · 0.70

Calls 9

luaX_nextFunction · 0.70
luaK_getlabelFunction · 0.70
condFunction · 0.70
enterblockFunction · 0.70
checknextFunction · 0.70
blockFunction · 0.70
check_matchFunction · 0.70
leaveblockFunction · 0.70
luaK_patchtohereFunction · 0.70

Tested by

no test coverage detected