def METHOD_NAME():
    """Iterate over the file, dispatching to appropriate macro handlers."""
    macros = {
            "content": content,
            "background": background,
            "both": both,
            "content_helper": omit_helper_func_factory("content"),
            "background_helper": omit_helper_func_factory("background"),
            "content_omit_line": omit_line_factory("content"),
            "background_omit_line": omit_line_factory("background"),
            }
    for context in ("background", "content"):
        with open("src/excmds.ts", encoding="utf-8") as source:
            output = PRELUDE
            lines = iter(source)
            for line in lines:
                if line.startswith("//#"):
                    macrocmd = line[3:].strip()
                    if macrocmd in macros:
                        output += macros[macrocmd](lines, context)
                    else:
                        raise Exception("Unknown macrocmd! {macrocmd}".format(**locals()))
                else:
                    output += line
            # print(output.rstrip())
            with open("src/.excmds_{context}.generated.ts".format(**locals()), "w", encoding="utf-8") as sink:
                print(output.rstrip(), file=sink)