Add a white space before line comment
| 263 | |
| 264 | // Add a white space before line comment |
| 265 | std::string FormatVisitor::formatLineComment(Token* token) { |
| 266 | std::string comment = token->getText(); |
| 267 | char firstChar = comment[2]; |
| 268 | if (isBlankChar(firstChar) || firstChar == '-' || firstChar == '\r' || firstChar == '\n') { |
| 269 | // do nothing |
| 270 | } else { |
| 271 | comment = "-- " + comment.substr(2, comment.size()); |
| 272 | } |
| 273 | return comment; |
| 274 | } |
| 275 | |
| 276 | antlrcpp::Any FormatVisitor::visitChunk(LuaParser::ChunkContext* ctx) { |
| 277 | LOG_FUNCTION_BEGIN(); |
nothing calls this directly
no test coverage detected