MCPcopy Create free account
hub / github.com/argotorg/solidity / formatUseSrcComment

Method formatUseSrcComment

libyul/Object.cpp:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80std::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
95Json Object::toJson() const
96{

Callers 2

toStringMethod · 0.80
calculateCacheKeyMethod · 0.80

Calls 2

joinHumanReadableFunction · 0.85
to_stringFunction · 0.70

Tested by

no test coverage detected