Removes multiline (c-style) comments from lines.
(filename, lines, error)
| 1153 | |
| 1154 | |
| 1155 | def RemoveMultiLineComments(filename, lines, error): |
| 1156 | """Removes multiline (c-style) comments from lines.""" |
| 1157 | lineix = 0 |
| 1158 | while lineix < len(lines): |
| 1159 | lineix_begin = FindNextMultiLineCommentStart(lines, lineix) |
| 1160 | if lineix_begin >= len(lines): |
| 1161 | return |
| 1162 | lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin) |
| 1163 | if lineix_end >= len(lines): |
| 1164 | error(filename, lineix_begin + 1, 'readability/multiline_comment', 5, |
| 1165 | 'Could not find end of multi-line comment') |
| 1166 | return |
| 1167 | RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1) |
| 1168 | lineix = lineix_end + 1 |
| 1169 | |
| 1170 | |
| 1171 | def CleanseComments(line): |
no test coverage detected