MCPcopy Create free account
hub / github.com/4paradigm/OpenMLDB / RemoveMultiLineComments

Function RemoveMultiLineComments

steps/cpplint.py:1884–1897  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

1882
1883
1884def 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
1900def CleanseComments(line):

Callers 1

ProcessFileDataFunction · 0.85

Tested by

no test coverage detected