def while_loop(printer, ast):
    """Prints "while (cond) {body}"."""
    cond_str = printer.ast_to_string(ast["cond"])
    body_str = printer.ast_to_string(ast["body"])
    return f'while ({cond_str}) {body_str}'