REPEAT block UNTIL exp;
| 472 | |
| 473 | // REPEAT block UNTIL exp; |
| 474 | antlrcpp::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; |
| 490 | antlrcpp::Any FormatVisitor::visitIfStat(LuaParser::IfStatContext* ctx) { |