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

Function ifstat

third-party/lua-5.5.0/src/lparser.c:1767–1778  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1765
1766
1767static void ifstat (LexState *ls, int line) {
1768 /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */
1769 FuncState *fs = ls->fs;
1770 int escapelist = NO_JUMP; /* exit list for finished parts */
1771 test_then_block(ls, &escapelist); /* IF cond THEN block */
1772 while (ls->t.token == TK_ELSEIF)
1773 test_then_block(ls, &escapelist); /* ELSEIF cond THEN block */
1774 if (testnext(ls, TK_ELSE))
1775 block(ls); /* 'else' part */
1776 check_match(ls, TK_END, TK_IF, line);
1777 luaK_patchtohere(fs, escapelist); /* patch escape list to 'if' end */
1778}
1779
1780
1781static void localfunc (LexState *ls) {

Callers 1

statementFunction · 0.70

Calls 5

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

Tested by

no test coverage detected