MCPcopy Create free account
hub / github.com/axmolengine/axmol / ifstat

Function ifstat

3rdparty/lua/plainlua/lparser.c:1674–1685  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1672
1673
1674static void ifstat (LexState *ls, int line) {
1675 /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */
1676 FuncState *fs = ls->fs;
1677 int escapelist = NO_JUMP; /* exit list for finished parts */
1678 test_then_block(ls, &escapelist); /* IF cond THEN block */
1679 while (ls->t.token == TK_ELSEIF)
1680 test_then_block(ls, &escapelist); /* ELSEIF cond THEN block */
1681 if (testnext(ls, TK_ELSE))
1682 block(ls); /* 'else' part */
1683 check_match(ls, TK_END, TK_IF, line);
1684 luaK_patchtohere(fs, escapelist); /* patch escape list to 'if' end */
1685}
1686
1687
1688static void localfunc (LexState *ls) {

Callers 1

statementFunction · 0.85

Calls 5

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

Tested by

no test coverage detected