MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / repeatstat

Function repeatstat

ThirdParty/lua/lua/lparser.c:1257–1274  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

statementFunction · 0.85

Calls 9

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

Tested by

no test coverage detected