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

Function test_then_block

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

Source from the content-addressed store, hash-verified

1750
1751
1752static void test_then_block (LexState *ls, int *escapelist) {
1753 /* test_then_block -> [IF | ELSEIF] cond THEN block */
1754 FuncState *fs = ls->fs;
1755 int condtrue;
1756 luaX_next(ls); /* skip IF or ELSEIF */
1757 condtrue = cond(ls); /* read condition */
1758 checknext(ls, TK_THEN);
1759 block(ls); /* 'then' part */
1760 if (ls->t.token == TK_ELSE ||
1761 ls->t.token == TK_ELSEIF) /* followed by 'else'/'elseif'? */
1762 luaK_concat(fs, escapelist, luaK_jump(fs)); /* must jump over it */
1763 luaK_patchtohere(fs, condtrue);
1764}
1765
1766
1767static void ifstat (LexState *ls, int line) {

Callers 1

ifstatFunction · 0.70

Calls 7

luaX_nextFunction · 0.70
condFunction · 0.70
checknextFunction · 0.70
blockFunction · 0.70
luaK_concatFunction · 0.70
luaK_jumpFunction · 0.70
luaK_patchtohereFunction · 0.70

Tested by

no test coverage detected