MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / readComment

Method readComment

src/share/jsoncpp/jsoncpp.cpp:567–588  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

565}
566
567bool Reader::readComment() {
568 Location commentBegin = current_ - 1;
569 Char c = getNextChar();
570 bool successful = false;
571 if (c == '*')
572 successful = readCStyleComment();
573 else if (c == '/')
574 successful = readCppStyleComment();
575 if (!successful)
576 return false;
577
578 if (collectComments_) {
579 CommentPlacement placement = commentBefore;
580 if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) {
581 if (c != '*' || !containsNewLine(commentBegin, current_))
582 placement = commentAfterOnSameLine;
583 }
584
585 addComment(commentBegin, current_, placement);
586 }
587 return true;
588}
589
590static JSONCPP_STRING normalizeEOL(Reader::Location begin, Reader::Location end) {
591 JSONCPP_STRING normalized;

Callers

nothing calls this directly

Calls 1

containsNewLineFunction · 0.85

Tested by

no test coverage detected