MCPcopy Create free account
hub / github.com/cuberite/cuberite / readComment

Method readComment

lib/jsoncpp/src/lib_json/json_reader.cpp:377–402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375
376
377bool
378Reader::readComment()
379{
380 Location commentBegin = current_ - 1;
381 Char c = getNextChar();
382 bool successful = false;
383 if ( c == '*' )
384 successful = readCStyleComment();
385 else if ( c == '/' )
386 successful = readCppStyleComment();
387 if ( !successful )
388 return false;
389
390 if ( collectComments_ )
391 {
392 CommentPlacement placement = commentBefore;
393 if ( lastValueEnd_ && !containsNewLine( lastValueEnd_, commentBegin ) )
394 {
395 if ( c != '*' || !containsNewLine( commentBegin, current_ ) )
396 placement = commentAfterOnSameLine;
397 }
398
399 addComment( commentBegin, current_, placement );
400 }
401 return true;
402}
403
404
405void

Callers

nothing calls this directly

Calls 1

containsNewLineFunction · 0.85

Tested by

no test coverage detected