(command.CommandList
  children: [
    (command.ShFunction
      name_tok: <Usage>
      name: Usage
      body: 
        (BraceGroup
          left: <Id.Lit_LBrace '{'>
          children: [
            (command.Simple
              blame_tok: <echo>
              more_env: []
              words: [
                {<echo>}
                {
                  (DQ <'Usage: '> 
                    (CommandSub
                      left_token: <Id.Left_Backtick '`'>
                      child: 
                        (command.Simple
                          blame_tok: <basename>
                          more_env: []
                          words: [{<basename>} {($ Id.VSub_Number 0)}]
                          redirects: []
                          do_fork: T
                        )
                      right: <Id.Backtick_Right '`'>
                    ) <' mon|tue|... [next]|week|last'>
                  )
                }
              ]
              redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})]
              do_fork: T
            )
            (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>})
          ]
          redirects: []
          right: <Id.Lit_RBrace '}'>
        )
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <Id.Lit_LBracket '['>
          more_env: []
          words: [
            {<Id.Lit_LBracket '['>}
            {(DQ ($ Id.VSub_Pound '#'))}
            {<-eq>}
            {(DQ <0>)}
            {<Id.Lit_RBracket ']'>}
          ]
          redirects: []
          do_fork: T
        )
        (command.Simple
          blame_tok: <Usage>
          more_env: []
          words: [{<Usage>}]
          redirects: []
          do_fork: T
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'day='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'day='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'day='> name:day)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 1)}
        )
      ]
      redirects: []
    )
    (command.ShAssignment
      left: <Id.Lit_VarLike 'which='>
      pairs: [
        (AssignPair
          left: <Id.Lit_VarLike 'which='>
          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'which='> name:which)
          op: assign_op.Equal
          rhs: {($ Id.VSub_Number 2)}
        )
      ]
      redirects: []
    )
    (command.AndOr
      children: [
        (command.Simple
          blame_tok: <Id.Lit_LBracket '['>
          more_env: []
          words: [
            {<Id.Lit_LBracket '['>}
            {<-z>}
            {(DQ ($ Id.VSub_DollarName which))}
            {<Id.Lit_RBracket ']'>}
          ]
          redirects: []
          do_fork: T
        )
        (command.ShAssignment
          left: <Id.Lit_VarLike 'which='>
          pairs: [
            (AssignPair
              left: <Id.Lit_VarLike 'which='>
              lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'which='> name:which)
              op: assign_op.Equal
              rhs: {<next>}
            )
          ]
          redirects: []
        )
      ]
      ops: [<Id.Op_DAmp _>]
    )
    (command.Case
      case_kw: <Id.KW_Case case>
      to_match: (case_arg.Word w:{($ Id.VSub_DollarName which)})
      arms_start: <Id.KW_In in>
      arms: [
        (CaseArm
          left: <week>
          pattern: (pat.Words words:[{<week>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {
                                  (CommandSub
                                    left_token: <Id.Left_Backtick '`'>
                                    child: 
                                      (command.Simple
                                        blame_tok: <date>
                                        more_env: []
                                        words: [{<date>} {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <D>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                    right: <Id.Backtick_Right '`'>
                                  )
                                }
                                {<Id.Lit_Equals '='>}
                                {
                                  (CommandSub
                                    left_token: <Id.Left_Backtick '`'>
                                    child: 
                                      (command.Simple
                                        blame_tok: <date>
                                        more_env: []
                                        words: [
                                          {<date>}
                                          {<--date> <Id.Lit_Equals '='> 
                                            (DQ <'next '> ($ Id.VSub_DollarName day))
                                          }
                                          {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <D>}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                    right: <Id.Backtick_Right '`'>
                                  )
                                }
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'weeks='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'weeks='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'weeks='> name:weeks)
                          op: assign_op.Equal
                          rhs: {<Id.Lit_Other '+'> <2>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [96 132]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'weeks='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'weeks='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'weeks='> name:weeks)
                      op: assign_op.Equal
                      rhs: {<Id.Lit_Other '+'> <1>}
                    )
                  ]
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <last>
          pattern: (pat.Words words:[{<last>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.ShAssignment
              left: <Id.Lit_VarLike 'weeks='>
              pairs: [
                (AssignPair
                  left: <Id.Lit_VarLike 'weeks='>
                  lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'weeks='> name:weeks)
                  op: assign_op.Equal
                  rhs: {<-1>}
                )
              ]
              redirects: []
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <next>
          pattern: (pat.Words words:[{<next>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.If
              if_kw: <Id.KW_If if>
              arms: [
                (IfArm
                  keyword: <Id.KW_If if>
                  cond: 
                    (condition.Shell
                      commands: [
                        (command.Sentence
                          child: 
                            (command.Simple
                              blame_tok: <Id.Lit_LBracket '['>
                              more_env: []
                              words: [
                                {<Id.Lit_LBracket '['>}
                                {
                                  (CommandSub
                                    left_token: <Id.Left_Backtick '`'>
                                    child: 
                                      (command.Simple
                                        blame_tok: <date>
                                        more_env: []
                                        words: [{<date>} {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <D>}]
                                        redirects: []
                                        do_fork: T
                                      )
                                    right: <Id.Backtick_Right '`'>
                                  )
                                }
                                {<Id.Lit_Equals '='>}
                                {
                                  (CommandSub
                                    left_token: <Id.Left_Backtick '`'>
                                    child: 
                                      (command.Simple
                                        blame_tok: <date>
                                        more_env: []
                                        words: [
                                          {<date>}
                                          {<--date> <Id.Lit_Equals '='> 
                                            (DQ <'next '> ($ Id.VSub_DollarName day))
                                          }
                                          {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <D>}
                                        ]
                                        redirects: []
                                        do_fork: T
                                      )
                                    right: <Id.Backtick_Right '`'>
                                  )
                                }
                                {<Id.Lit_RBracket ']'>}
                              ]
                              redirects: []
                              do_fork: T
                            )
                          terminator: <Id.Op_Semi _>
                        )
                      ]
                    )
                  then_kw: <Id.KW_Then then>
                  action: [
                    (command.ShAssignment
                      left: <Id.Lit_VarLike 'weeks='>
                      pairs: [
                        (AssignPair
                          left: <Id.Lit_VarLike 'weeks='>
                          lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'weeks='> name:weeks)
                          op: assign_op.Equal
                          rhs: {<Id.Lit_Other '+'> <1>}
                        )
                      ]
                      redirects: []
                    )
                  ]
                  spids: [167 203]
                )
              ]
              else_kw: <Id.KW_Else else>
              else_action: [
                (command.ShAssignment
                  left: <Id.Lit_VarLike 'weeks='>
                  pairs: [
                    (AssignPair
                      left: <Id.Lit_VarLike 'weeks='>
                      lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'weeks='> name:weeks)
                      op: assign_op.Equal
                      rhs: {<Id.Lit_Other '+'> <0>}
                    )
                  ]
                  redirects: []
                )
              ]
              fi_kw: <Id.KW_Fi fi>
              redirects: []
            )
          ]
          right: <Id.Op_DSemi _>
        )
        (CaseArm
          left: <Id.Lit_Star '*'>
          pattern: (pat.Words words:[{<Id.Lit_Star '*'>}])
          middle: <Id.Right_CasePat _>
          action: [
            (command.Simple
              blame_tok: <Usage>
              more_env: []
              words: [{<Usage>}]
              redirects: []
              do_fork: T
            )
          ]
          right: <Id.Op_DSemi _>
        )
      ]
      arms_end: <Id.KW_Esac esac>
      redirects: []
    )
    (command.Simple
      blame_tok: <date>
      more_env: []
      words: [
        {<date>}
        {<--date> <Id.Lit_Equals '='> 
          (DQ ($ Id.VSub_DollarName day) <' '> ($ Id.VSub_DollarName weeks) <' weeks'>)
        }
        {<Id.Lit_Other '+'> <Id.Lit_Other '%'> <x>}
      ]
      redirects: []
      do_fork: T
    )
  ]
)