(CommandList
  children: [
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:USAGE)
          op: Equal
          rhs: {(SQ <'bazel-run.sh [<bazel option>...] <target> [ -- [<target option>]... ]'>)}
          spids: [48]
        )
      ]
      spids: [48]
    )
    (Assignment
      keyword: Assign_None
      pairs: [
        (assign_pair
          lhs: (LhsName name:DESCRIPTION)
          op: Equal
          rhs: 
            {
              (SQ <'\n'> <'  Builds and runs the command generated by "bazel run" in the calling\n'> 
                <'  terminal. The command is run as a grandchild of the current shell,\n'> <'  not from the Bazel server. Therefore, the program will have a controlling terminal, and\n'> 
                <'  the Bazel lock is released before running the command.'>
              )
            }
          spids: [53]
        )
      ]
      spids: [53]
    )
    (FuncDef
      name: usage
      body: 
        (BraceGroup
          children: [
            (SimpleCommand
              words: [{(echo)} {(DQ ($ VSub_Name '$USAGE'))} {(DQ ($ VSub_Name '$DESCRIPTION'))}]
              redirects: [(Redir op:<Redir_GreatAnd '>&'> fd:16777215 arg_word:{(2)})]
            )
          ]
          spids: [69]
        )
      spids: [63 68]
    )
    (FuncDef
      name: die
      body: 
        (BraceGroup
          children: [
            (C {(echo)} {(DQ ($ VSub_Number '$1'))})
            (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
          ]
          spids: [94]
        )
      spids: [88 93]
    )
    (FuncDef
      name: cleanup
      body: (BraceGroup children:[(C {(rm)} {(DQ ($ VSub_Name '$runcmd'))})] spids:[117])
      spids: [111 116]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (C {(Lit_Other '[')} {($ VSub_Pound '$#')} {(-gt)} {(0)} {(Lit_Other ']')})
        (BraceGroup
          children: [
            (Sentence child:(C {(usage)}) terminator:<Op_Semi ';'>)
            (Sentence
              child: (ControlFlow token:<ControlFlow_Exit exit> arg_word:{(1)})
              terminator: <Op_Semi ';'>
            )
          ]
          spids: [141]
        )
      ]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (Assignment
          keyword: Assign_None
          pairs: [
            (assign_pair
              lhs: (LhsName name:runcmd)
              op: Equal
              rhs: 
                {
                  (DQ 
                    (CommandSubPart
                      command_list: (CommandList children:[(C {(mktemp)} {(/tmp/bazel-run.XXXXXX)})])
                      left_token: <Left_CommandSub '$('>
                      spids: [156 160]
                    )
                  )
                }
              spids: [154]
            )
          ]
          spids: [154]
        )
        (C {(die)} {(DQ ('Could not create tmp file'))})
      ]
    )
    (C {(trap)} {(DQ (cleanup))} {(EXIT)})
    (AndOr
      ops: [Op_DPipe]
      children: [
        (C {(bazel)} {(run)} {(--script_path) (Lit_Other '=') (DQ ($ VSub_Name '$runcmd'))} 
          {(DQ ($ VSub_At '$@'))}
        )
        (ControlFlow token:<ControlFlow_Exit exit> arg_word:{($ VSub_QMark '$?')})
      ]
    )
    (AndOr
      ops: [Op_DPipe]
      children: [
        (C {(Lit_Other '[')} {(-x)} {(DQ ($ VSub_Name '$runcmd'))} {(Lit_Other ']')})
        (C {(die)} {(DQ ('File ') ($ VSub_Name '$runcmd') (' not executable'))})
      ]
    )
    (C {(DQ ($ VSub_Name '$runcmd'))})
  ]
)