def chan_expr(printer, ast):
    """Prints a channel expression."""
    name_str = ast["name"]
    exprs_str = ''.join(map(lambda index: f'[{printer.ast_to_string(index)}]', ast["indices"]))
    return f'{name_str}{exprs_str}'