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

Function repeatstat

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

Source from the content-addressed store, hash-verified

1250
1251
1252static void repeatstat (LexState *ls, int line) {
1253 /* repeatstat -> REPEAT block UNTIL cond */
1254 int condexit;
1255 FuncState *fs = ls->fs;
1256 int repeat_init = luaK_getlabel(fs);
1257 BlockCnt bl1, bl2;
1258 enterblock(fs, &bl1, 1); /* loop block */
1259 enterblock(fs, &bl2, 0); /* scope block */
1260 luaX_next(ls); /* skip REPEAT */
1261 statlist(ls);
1262 check_match(ls, TK_UNTIL, TK_REPEAT, line);
1263 condexit = cond(ls); /* read condition (inside scope block) */
1264 if (bl2.upval) /* upvalues? */
1265 luaK_patchclose(fs, condexit, bl2.nactvar);
1266 leaveblock(fs); /* finish scope */
1267 luaK_patchlist(fs, condexit, repeat_init); /* close the loop */
1268 leaveblock(fs); /* finish loop */
1269}
1270
1271
1272static int exp1 (LexState *ls) {

Callers 1

statementFunction · 0.70

Calls 9

luaK_getlabelFunction · 0.70
enterblockFunction · 0.70
luaX_nextFunction · 0.70
statlistFunction · 0.70
check_matchFunction · 0.70
condFunction · 0.70
luaK_patchcloseFunction · 0.70
leaveblockFunction · 0.70
luaK_patchlistFunction · 0.70

Tested by

no test coverage detected