def _remove_comments(self, js: str) -> str:
        """Remove comments from JavaScript code to simplify parsing."""
        # Remove multi-line comments
        js = re.sub(r"/\*.*?\*/", "", js, flags=re.DOTALL)
        # Remove single-line comments
        js = re.sub(r"//.*?$", "", js, flags=re.MULTILINE)
        return js
Remove comments from JavaScript code to simplify parsing.
py/core/parsers/text/js_parser.py