| 1750 | |
| 1751 | |
| 1752 | static 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 | |
| 1767 | static void ifstat (LexState *ls, int line) { |
no test coverage detected