| 27 | } |
| 28 | |
| 29 | void DiagnosticInspection(std::string_view message, TextRange range, LuaSource &file, |
| 30 | std::string_view path) { |
| 31 | auto startLine = file.GetLine(range.StartOffset); |
| 32 | auto startChar = file.GetColumn(range.StartOffset); |
| 33 | auto endLine = file.GetLine(range.GetEndOffset()); |
| 34 | auto endChar = file.GetColumn(range.GetEndOffset()); |
| 35 | std::cerr << util::format("\t{}({}:{} to {}:{}): {}", path, startLine + 1, startChar, endLine + 1, endChar, |
| 36 | message) |
| 37 | << std::endl; |
| 38 | } |
| 39 | |
| 40 | nlohmann::json DiagnosticToJson(std::string_view message, TextRange range, LuaSource &file) { |
| 41 | auto startLine = file.GetLine(range.StartOffset); |
no test coverage detected