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

Method visitVarOrExp

src/FormatVisitor.cpp:1180–1194  ·  view source on GitHub ↗

var | LP exp RP;

Source from the content-addressed store, hash-verified

1178
1179// var | LP exp RP;
1180antlrcpp::Any FormatVisitor::visitVarOrExp(LuaParser::VarOrExpContext* ctx) {
1181 LOG_FUNCTION_BEGIN();
1182 if (ctx->exp() != nullptr) {
1183 cur_writer() << ctx->LP()->getText();
1184 cur_writer() << commentAfter(ctx->LP(), "");
1185 visitExp(ctx->exp());
1186 cur_writer() << commentAfter(ctx->exp(), "");
1187 cur_writer() << ctx->RP()->getText();
1188
1189 } else {
1190 visitVar(ctx->var());
1191 }
1192 LOG_FUNCTION_END();
1193 return nullptr;
1194}
1195
1196// (NAME | LP exp RP varSuffix) varSuffix*;
1197antlrcpp::Any FormatVisitor::visitVar(LuaParser::VarContext* ctx) {

Callers

nothing calls this directly

Calls 4

expMethod · 0.80
LPMethod · 0.80
RPMethod · 0.80
varMethod · 0.80

Tested by

no test coverage detected