var | LP exp RP;
| 1178 | |
| 1179 | // var | LP exp RP; |
| 1180 | antlrcpp::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*; |
| 1197 | antlrcpp::Any FormatVisitor::visitVar(LuaParser::VarContext* ctx) { |