WHILE exp DO block END;
| 458 | |
| 459 | // WHILE exp DO block END; |
| 460 | antlrcpp::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; |
| 474 | antlrcpp::Any FormatVisitor::visitRepeatStat(LuaParser::RepeatStatContext* ctx) { |