MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / repeatstat

Function repeatstat

src/Chain/libraries/glua/lparser.cpp:1317–1334  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1315
1316
1317static void repeatstat(LexState *ls, int line) {
1318 /* repeatstat -> REPEAT block UNTIL cond */
1319 int condexit;
1320 FuncState *fs = ls->fs;
1321 int repeat_init = luaK_getlabel(fs);
1322 BlockCnt bl1, bl2;
1323 enterblock(fs, &bl1, 1); /* loop block */
1324 enterblock(fs, &bl2, 0); /* scope block */
1325 luaX_next(ls); /* skip REPEAT */
1326 statlist(ls);
1327 check_match(ls, TK_UNTIL, TK_REPEAT, line);
1328 condexit = cond(ls); /* read condition (inside scope block) */
1329 if (bl2.upval) /* upvalues? */
1330 luaK_patchclose(fs, condexit, bl2.nactvar);
1331 leaveblock(fs); /* finish scope */
1332 luaK_patchlist(fs, condexit, repeat_init); /* close the loop */
1333 leaveblock(fs); /* finish loop */
1334}
1335
1336
1337static 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