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

Method visitRetstat

src/FormatVisitor.cpp:639–654  ·  view source on GitHub ↗

RETURN explist? SEMI?;

Source from the content-addressed store, hash-verified

637
638// RETURN explist? SEMI?;
639antlrcpp::Any FormatVisitor::visitRetstat(LuaParser::RetstatContext* ctx) {
640 LOG_FUNCTION_BEGIN();
641 if (chop_down_block_) {
642 cur_writer() << indent();
643 }
644 cur_writer() << ctx->RETURN()->getText();
645 if (ctx->explist() != nullptr) {
646 cur_writer() << commentAfter(ctx->RETURN(), " ");
647 visitExplist(ctx->explist());
648 }
649 if (ctx->SEMI() != nullptr) {
650 cur_writer() << ctx->SEMI()->getText();
651 }
652 LOG_FUNCTION_END();
653 return nullptr;
654}
655
656// var (COMMA var)*;
657antlrcpp::Any FormatVisitor::visitVarlist(LuaParser::VarlistContext* ctx) {

Callers

nothing calls this directly

Calls 3

RETURNMethod · 0.80
explistMethod · 0.80
SEMIMethod · 0.80

Tested by

no test coverage detected