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

Method visitForInStat

src/FormatVisitor.cpp:571–586  ·  view source on GitHub ↗

FOR namelist IN explist DO block END;

Source from the content-addressed store, hash-verified

569
570// FOR namelist IN explist DO block END;
571antlrcpp::Any FormatVisitor::visitForInStat(LuaParser::ForInStatContext* ctx) {
572 LOG_FUNCTION_BEGIN();
573 cur_writer() << ctx->FOR()->getText();
574 cur_writer() << commentAfter(ctx->FOR(), " ");
575 visitNamelist(ctx->namelist());
576 cur_writer() << commentAfter(ctx->namelist(), " ");
577 cur_writer() << ctx->IN()->getText();
578 cur_writer() << commentAfter(ctx->IN(), " ");
579 visitExplist(ctx->explist());
580 cur_writer() << commentAfter(ctx->explist(), " ");
581 cur_writer() << ctx->DO()->getText();
582 visitBlockAndComment(ctx->DO(), ctx->block(), CONTROL_BLOCK);
583 cur_writer() << ctx->END()->getText();
584 LOG_FUNCTION_END();
585 return nullptr;
586}
587
588// FUNCTION funcname funcbody;
589antlrcpp::Any FormatVisitor::visitFuncStat(LuaParser::FuncStatContext* ctx) {

Callers

nothing calls this directly

Calls 7

FORMethod · 0.80
namelistMethod · 0.80
INMethod · 0.80
explistMethod · 0.80
DOMethod · 0.80
blockMethod · 0.80
ENDMethod · 0.80

Tested by

no test coverage detected