| 78 | } |
| 79 | |
| 80 | std::string ObjectDebugData::formatUseSrcComment() const |
| 81 | { |
| 82 | if (!sourceNames) |
| 83 | return ""; |
| 84 | |
| 85 | auto formatIdNamePair = [](auto&& _pair) { |
| 86 | return std::to_string(_pair.first) + ":" + util::escapeAndQuoteString(*_pair.second); |
| 87 | }; |
| 88 | |
| 89 | std::string serializedSourceNames = joinHumanReadable( |
| 90 | ranges::views::transform(*sourceNames, formatIdNamePair) |
| 91 | ); |
| 92 | return "/// @use-src " + serializedSourceNames + "\n"; |
| 93 | } |
| 94 | |
| 95 | Json Object::toJson() const |
| 96 | { |
no test coverage detected