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