Removes multiline (c-style) comments from lines.
(filename, lines, error)
| 1882 | |
| 1883 | |
| 1884 | def RemoveMultiLineComments(filename, lines, error): |
| 1885 | """Removes multiline (c-style) comments from lines.""" |
| 1886 | lineix = 0 |
| 1887 | while lineix < len(lines): |
| 1888 | lineix_begin = FindNextMultiLineCommentStart(lines, lineix) |
| 1889 | if lineix_begin >= len(lines): |
| 1890 | return |
| 1891 | lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) |
| 1892 | if lineix_end >= len(lines): |
| 1893 | error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, |
| 1894 | 'Could not find end of multi-line comment') |
| 1895 | return |
| 1896 | RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) |
| 1897 | lineix = lineix_end + 1 |
| 1898 | |
| 1899 | |
| 1900 | def CleanseComments(line): |
no test coverage detected