MCPcopy Create free account
hub / github.com/Illumina/hap.py / readComment

Method readComment

external/jsoncpp/jsoncpp.cpp:513–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

511}
512
513bool Reader::readComment() {
514 Location commentBegin = current_ - 1;
515 Char c = getNextChar();
516 bool successful = false;
517 if (c == '*')
518 successful = readCStyleComment();
519 else if (c == '/')
520 successful = readCppStyleComment();
521 if (!successful)
522 return false;
523
524 if (collectComments_) {
525 CommentPlacement placement = commentBefore;
526 if (lastValueEnd_ && !containsNewLine(lastValueEnd_, commentBegin)) {
527 if (c != '*' || !containsNewLine(commentBegin, current_))
528 placement = commentAfterOnSameLine;
529 }
530
531 addComment(commentBegin, current_, placement);
532 }
533 return true;
534}
535
536void
537Reader::addComment(Location begin, Location end, CommentPlacement placement) {

Callers

nothing calls this directly

Calls 1

containsNewLineFunction · 0.85

Tested by

no test coverage detected