import re


def remove_comments(code: str) -> str:
    """
    Removes comments from code to facilitate using pycparser.
    """
    code = re.sub('//.*\n|/\*.*\*/', '', code)  # greedy *?
    return code