Removes multiline (c-style) comments from lines.
(filename, lines, error)
| 1395 | |
| 1396 | |
| 1397 | def RemoveMultiLineComments(filename, lines, error): |
| 1398 | """Removes multiline (c-style) comments from lines.""" |
| 1399 | lineix = 0 |
| 1400 | while lineix < len(lines): |
| 1401 | lineix_begin = FindNextMultiLineCommentStart(lines, lineix) |
| 1402 | if lineix_begin >= len(lines): |
| 1403 | return |
| 1404 | lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) |
| 1405 | if lineix_end >= len(lines): |
| 1406 | error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, |
| 1407 | 'Could not find end of multi-line comment') |
| 1408 | return |
| 1409 | RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) |
| 1410 | lineix = lineix_end + 1 |
| 1411 | |
| 1412 | |
| 1413 | def CleanseComments(line): |
no test coverage detected