MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / IfStatement

Method IfStatement

LuaParser/src/Parse/LuaParser.cpp:224–239  ·  view source on GitHub ↗

ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */

Source from the content-addressed store, hash-verified

222
223/* ifstat -> IF cond THEN block {ELSEIF cond THEN block} [ELSE block] END */
224void LuaParser::IfStatement() {
225 auto m = Mark();
226
227 TestThenBlock();
228 while (Current() == TK_ELSEIF) {
229 TestThenBlock();
230 }
231 if (TestAndNext(TK_ELSE)) {
232 Block();
233 }
234 CheckAndNext(TK_END);
235
236 TestAndNext(';');
237
238 m.Complete(*this, LuaSyntaxNodeKind::IfStatement);
239}
240
241/* whilestat -> WHILE cond DO block END */
242void LuaParser::WhileStatement() {

Callers

nothing calls this directly

Calls 1

CompleteMethod · 0.80

Tested by

no test coverage detected