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

Function ifstat

third-party/lua-5.3.5/src/lparser.c:1417–1428  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1415
1416
1417static void ifstat (LexState *ls, int line) {
1418 /* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */
1419 FuncState *fs = ls->fs;
1420 int escapelist = NO_JUMP; /* exit list for finished parts */
1421 test_then_block(ls, &escapelist); /* IF cond THEN block */
1422 while (ls->t.token == TK_ELSEIF)
1423 test_then_block(ls, &escapelist); /* ELSEIF cond THEN block */
1424 if (testnext(ls, TK_ELSE))
1425 block(ls); /* 'else' part */
1426 check_match(ls, TK_END, TK_IF, line);
1427 luaK_patchtohere(fs, escapelist); /* patch escape list to 'if' end */
1428}
1429
1430
1431static 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