MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / writeCommentBeforeValue

Method writeCommentBeforeValue

json/jsoncpp.cpp:4781–4798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4779}
4780
4781void StyledWriter::writeCommentBeforeValue(const Value& root) {
4782 if (!root.hasComment(commentBefore))
4783 return;
4784
4785 document_ += "\n";
4786 writeIndent();
4787 const JSONCPP_STRING& comment = root.getComment(commentBefore);
4788 JSONCPP_STRING::const_iterator iter = comment.begin();
4789 while (iter != comment.end()) {
4790 document_ += *iter;
4791 if (*iter == '\n' && ((iter + 1) != comment.end() && *(iter + 1) == '/'))
4792 writeIndent();
4793 ++iter;
4794 }
4795
4796 // Comments are stripped of trailing newlines, so add one here
4797 document_ += "\n";
4798}
4799
4800void StyledWriter::writeCommentAfterValueOnSameLine(const Value& root) {
4801 if (root.hasComment(commentAfterOnSameLine))

Callers

nothing calls this directly

Calls 4

hasCommentMethod · 0.80
getCommentMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected