LOCAL namelist (EQL explist)? SEMI?;
| 613 | |
| 614 | // LOCAL namelist (EQL explist)? SEMI?; |
| 615 | antlrcpp::Any FormatVisitor::visitLocalVarDecl(LuaParser::LocalVarDeclContext* ctx) { |
| 616 | LOG_FUNCTION_BEGIN(); |
| 617 | cur_writer() << ctx->LOCAL()->getText(); |
| 618 | cur_writer() << commentAfter(ctx->LOCAL(), " "); |
| 619 | visitAttnamelist(ctx->attnamelist()); |
| 620 | if (ctx->EQL() != nullptr) { |
| 621 | cur_writer() << commentAfter(ctx->attnamelist(), " "); |
| 622 | cur_writer() << ctx->EQL()->getText(); |
| 623 | cur_writer() << commentAfter(ctx->EQL(), " "); |
| 624 | visitExplist(ctx->explist()); |
| 625 | } |
| 626 | if (ctx->SEMI() != nullptr) { |
| 627 | if (ctx->EQL() == nullptr) { |
| 628 | cur_writer() << commentAfter(ctx->attnamelist(), ""); |
| 629 | } else { |
| 630 | cur_writer() << commentAfter(ctx->explist(), ""); |
| 631 | } |
| 632 | cur_writer() << ctx->SEMI()->getText(); |
| 633 | } |
| 634 | LOG_FUNCTION_END(); |
| 635 | return nullptr; |
| 636 | } |
| 637 | |
| 638 | // RETURN explist? SEMI?; |
| 639 | antlrcpp::Any FormatVisitor::visitRetstat(LuaParser::RetstatContext* ctx) { |
nothing calls this directly
no test coverage detected