def p_function_body(p):
    """function_body : shell_command
                     | shell_command redirection_list"""
    assert p[1].kind == 'compound'
    p[0] = p[1]
    if len(p) == 3:
        p[0].redirects.extend(p[2])
        assert p[0].pos[0] < p[0].redirects[-1].pos[1]
        p[0].pos = p[0].pos[0], p[0].redirects[-1].pos[1]
