MCPcopy Create free account
hub / github.com/Koihik/LuaFormatter / visitWhileStat

Method visitWhileStat

src/FormatVisitor.cpp:460–471  ·  view source on GitHub ↗

WHILE exp DO block END;

Source from the content-addressed store, hash-verified

458
459// WHILE exp DO block END;
460antlrcpp::Any FormatVisitor::visitWhileStat(LuaParser::WhileStatContext* ctx) {
461 LOG_FUNCTION_BEGIN();
462 cur_writer() << ctx->WHILE()->getText();
463 cur_writer() << commentAfter(ctx->WHILE(), " ");
464 visitExp(ctx->exp());
465 cur_writer() << commentAfter(ctx->exp(), " ");
466 cur_writer() << ctx->DO()->getText();
467 visitBlockAndComment(ctx->DO(), ctx->block(), CONTROL_BLOCK);
468 cur_writer() << ctx->END()->getText();
469 LOG_FUNCTION_END();
470 return nullptr;
471}
472
473// REPEAT block UNTIL exp;
474antlrcpp::Any FormatVisitor::visitRepeatStat(LuaParser::RepeatStatContext* ctx) {

Callers

nothing calls this directly

Calls 5

WHILEMethod · 0.80
expMethod · 0.80
DOMethod · 0.80
blockMethod · 0.80
ENDMethod · 0.80

Tested by

no test coverage detected