(command.CommandList
  children: [
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_LBracket '[')} {(-z)} {(DQ ($ VSub_DollarName '$EMACS'))} {(Lit_RBracket ']')})
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (command.ShAssignment
              pairs: [(assign_pair lhs:(sh_lhs_expr.Name name:EMACS) op:Equal rhs:{(emacs)})]
            )
          ]
        )
      ]
    )
    (command.AndOr
      ops: [Op_DPipe]
      children: [
        (C {($ VSub_DollarName '$EMACS')} {(--batch)})
        (command.BraceGroup
          children: [
            (C {(echo)} {(DQ ('You must set EMACS to a program that runs emacs.'))})
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
        )
      ]
    )
    (command.Sentence
      child: 
        (command.AndOr
          ops: [Op_DPipe]
          children: [
            (C 
              {
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Simple
                          words: [{($ VSub_DollarName '$EMACS')} {(-batch)}]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: <Redir_GreatAnd '2>&'>
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                    )
                )
              }
            )
            (command.BraceGroup
              children: [
                (C {(echo)} 
                  {
                    (DQ ('Your emacs command (') ($ VSub_DollarName '$EMACS') 
                      (') does not run properly.')
                    )
                  }
                )
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(2)})
              ]
            )
          ]
        )
      terminator: <Op_Semi ';'>
    )
    (command.Sentence
      child: 
        (command.AndOr
          ops: [Op_DPipe]
          children: [
            (C 
              {
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Simple
                          words: [
                            {($ VSub_DollarName '$EMACS')}
                            {(-batch)}
                            {(--eval)}
                            {(DQ ("(require 'ert)"))}
                          ]
                          redirects: [
                            (redir.Redir
                              op: <Redir_Great '>'>
                              fd: 16777215
                              arg_word: {(/dev/null)}
                            )
                            (redir.Redir
                              op: <Redir_GreatAnd '2>&'>
                              fd: 2
                              arg_word: {(1)}
                            )
                          ]
                        )
                      ]
                    )
                )
              }
            )
            (command.BraceGroup
              children: [
                (C {(echo)} {(SQ <'You must install the `ert` dependency; see README.md'>)})
                (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(3)})
              ]
            )
          ]
        )
      terminator: <Op_Semi ';'>
    )
    (command.ShAssignment
      pairs: [
        (assign_pair
          lhs: (sh_lhs_expr.Name name:warnings)
          op: Equal
          rhs: 
            {
              (DQ 
                (command_sub
                  left_token: <Left_DollarParen '$('>
                  command_list: 
                    (command.CommandList
                      children: [
                        (command.Pipeline
                          children: [
                            (command.Simple
                              words: [
                                {($ VSub_DollarName '$EMACS')}
                                {(-Q)}
                                {(-batch)}
                                {(-f)}
                                {(batch-byte-compile)}
                                {(rust-mode.el)}
                              ]
                              redirects: [(redir.Redir op:<Redir_GreatAnd '2>&'> fd:2 arg_word:{(1)})]
                            )
                            (C {(grep)} {(-v)} {(SQ <'^Wrote '>)})
                          ]
                          negated: F
                        )
                      ]
                    )
                )
              )
            }
        )
      ]
    )
    (command.If
      arms: [
        (if_arm
          cond: [
            (command.Sentence
              child: 
                (C {(Lit_LBracket '[')} {(-n)} {(DQ ($ VSub_DollarName '$warnings'))} 
                  {(Lit_RBracket ']')}
                )
              terminator: <Op_Semi ';'>
            )
          ]
          action: [
            (C {(echo)} {(DQ ('Byte-compilation failed:'))})
            (C {(echo)} {(DQ ($ VSub_DollarName '$warnings'))})
            (command.ControlFlow token:<ControlFlow_Exit exit> arg_word:{(4)})
          ]
        )
      ]
      else_action: [(C {(echo)} {(DQ ('Byte-compilation passed.'))})]
    )
    (C {($ VSub_DollarName '$EMACS')} {(-batch)} {(-l)} {(rust-mode.el)} {(-l)} {(rust-mode-tests.el)} 
      {(-f)} {(ert-run-tests-batch-and-exit)}
    )
  ]
)