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

Method readComment

vrclient_x64/jsoncpp.cpp:532–553  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

containsNewLineFunction · 0.85

Tested by

no test coverage detected