MCPcopy Index your code
hub / github.com/nodejs/node / RemoveMultiLineComments

Function RemoveMultiLineComments

tools/cpplint.py:2085–2103  ·  view source on GitHub ↗

Removes multiline (c-style) comments from lines.

(filename, lines, error)

Source from the content-addressed store, hash-verified

2083
2084
2085def RemoveMultiLineComments(filename, lines, error):
2086 """Removes multiline (c-style) comments from lines."""
2087 lineix = 0
2088 while lineix < len(lines):
2089 lineix_begin = FindNextMultiLineCommentStart(lines, lineix)
2090 if lineix_begin >= len(lines):
2091 return
2092 lineix_end = FindNextMultiLineCommentEnd(lines, lineix_begin)
2093 if lineix_end >= len(lines):
2094 error(
2095 filename,
2096 lineix_begin + 1,
2097 "readability/multiline_comment",
2098 5,
2099 "Could not find end of multi-line comment",
2100 )
2101 return
2102 RemoveMultiLineCommentsFromRange(lines, lineix_begin, lineix_end + 1)
2103 lineix = lineix_end + 1
2104
2105
2106def CleanseComments(line):

Callers 1

ProcessFileDataFunction · 0.85

Calls 4

errorFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…