MCPcopy Create free account
hub / github.com/Illumina/paragraph / readComment

Method readComment

external/jsoncpp/jsoncpp.cpp:563–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected