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

Function ifstat

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

Source from the content-addressed store, hash-verified

1474
1475
1476static void ifstat(LexState *ls, int line) {
1477 /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */
1478 FuncState *fs = ls->fs;
1479 int escapelist = NO_JUMP; /* exit list for finished parts */
1480 test_then_block(ls, &escapelist); /* IF cond THEN block */
1481 if (ls->L->force_stopping)
1482 return;
1483 while (ls->t.token == TK_ELSEIF)
1484 test_then_block(ls, &escapelist); /* ELSEIF cond THEN block */
1485 if (testnext(ls, TK_ELSE))
1486 block(ls); /* 'else' part */
1487 check_match(ls, TK_END, TK_IF, line);
1488 luaK_patchtohere(fs, escapelist); /* patch escape list to 'if' end */
1489}
1490
1491
1492static void localfunc(LexState *ls) {

Callers 1

statementFunction · 0.85

Calls 5

test_then_blockFunction · 0.85
testnextFunction · 0.85
luaK_patchtohereFunction · 0.85
blockFunction · 0.70
check_matchFunction · 0.70

Tested by

no test coverage detected