| 375 | |
| 376 | |
| 377 | bool |
| 378 | Reader::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 | |
| 405 | void |
nothing calls this directly
no test coverage detected