Remove block comments and single-line comments.
(text: str)
| 13 | |
| 14 | |
| 15 | def _strip_comments(text: str) -> str: |
| 16 | """Remove block comments and single-line comments.""" |
| 17 | text = re.sub(r"/\*[\s\S]*?\*/", "", text) |
| 18 | text = re.sub(r"//.*$", "", text, flags=re.MULTILINE) |
| 19 | return text |
| 20 | |
| 21 | |
| 22 | def _normalize_type(t: str) -> str: |
no test coverage detected