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

Method visitRepeatStat

src/FormatVisitor.cpp:474–487  ·  view source on GitHub ↗

REPEAT block UNTIL exp;

Source from the content-addressed store, hash-verified

472
473// REPEAT block UNTIL exp;
474antlrcpp::Any FormatVisitor::visitRepeatStat(LuaParser::RepeatStatContext* ctx) {
475 LOG_FUNCTION_BEGIN();
476 cur_writer() << ctx->REPEAT()->getText();
477 visitBlockAndComment(ctx->REPEAT(), ctx->block(), CONTROL_BLOCK);
478 cur_writer() << ctx->UNTIL()->getText();
479 cur_writer() << commentAfter(ctx->UNTIL(), " ");
480 visitExp(ctx->exp());
481 if (ctx->SEMI() != nullptr) {
482 cur_writer() << commentAfter(ctx->exp(), "");
483 cur_writer() << ctx->SEMI()->getText();
484 }
485 LOG_FUNCTION_END();
486 return nullptr;
487}
488
489// IF exp THEN block (ELSEIF exp THEN block)* (ELSE block)? END;
490antlrcpp::Any FormatVisitor::visitIfStat(LuaParser::IfStatContext* ctx) {

Callers

nothing calls this directly

Calls 5

REPEATMethod · 0.80
blockMethod · 0.80
UNTILMethod · 0.80
expMethod · 0.80
SEMIMethod · 0.80

Tested by

no test coverage detected