MCPcopy Create free account
hub / github.com/ValveSoftware/openvr / readComment

Method readComment

src/jsoncpp.cpp:533–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

531}
532
533bool Reader::readComment() {
534 Location commentBegin = current_ - 1;
535 Char c = getNextChar();
536 bool successful = false;
537 if (c == '*')
538 successful = readCStyleComment();
539 else if (c == '/')
540 successful = readCppStyleComment();
541 if (!successful)
542 return false;
543
544 if (collectComments_) {
545 CommentPlacement placement = commentBefore;
546 if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) {
547 if (c != '*' || !containsNewLine(commentBegin, current_))
548 placement = commentAfterOnSameLine;
549 }
550
551 addComment(commentBegin, current_, placement);
552 }
553 return true;
554}
555
556static std::string normalizeEOL(Reader::Location begin, Reader::Location end) {
557 std::string normalized;

Callers

nothing calls this directly

Calls 1

containsNewLineFunction · 0.85

Tested by

no test coverage detected