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

Method visitVarDecl

src/FormatVisitor.cpp:351–364  ·  view source on GitHub ↗

varlist EQL explist;

Source from the content-addressed store, hash-verified

349
350// varlist EQL explist;
351antlrcpp::Any FormatVisitor::visitVarDecl(LuaParser::VarDeclContext* ctx) {
352 LOG_FUNCTION_BEGIN();
353 visitVarlist(ctx->varlist());
354 cur_writer() << commentAfter(ctx->varlist(), " ");
355 cur_writer() << ctx->EQL()->getText();
356 cur_writer() << commentAfter(ctx->EQL(), " ");
357 visitExplist(ctx->explist());
358 if (ctx->SEMI() != nullptr) {
359 cur_writer() << commentAfter(ctx->explist(), "");
360 cur_writer() << ctx->SEMI()->getText();
361 }
362 LOG_FUNCTION_END();
363 return nullptr;
364}
365
366// Builds first argument whitespace in spaces.
367// local a = f<WS>{1, 2, 3} or f<WS>"a"

Callers

nothing calls this directly

Calls 4

varlistMethod · 0.80
EQLMethod · 0.80
explistMethod · 0.80
SEMIMethod · 0.80

Tested by

no test coverage detected