(CommandList
  children: [
    (C {(_Dbg_help_add)} {(quit)} 
      {
        (SQ <'**quit** [*exit-code* [*shell-levels*]]\n'> <'\n'> <'Quit the debugger.\n'> <'\n'> 
          <'The program being debugged is aborted.  If EXIT-CODE is given that\n'> <'will be the exit return code. If SHELL-LEVELS then up to that many\n'> 
          <'nested shells are quit. However to be effective, the last of those\n'> <'shells should have been run under the debugger.\n'> <'\n'> <'See also:\n'> <'---------\n'> <'\n'> 
          <'**finish**, **return** and **run**.'>
        )
      }
    )
    (FuncDef
      name: _Dbg_do_quit
      body: 
        (BraceGroup
          children: [
            (Assignment
              keyword: Assign_Typeset
              flags: [-i]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:return_code)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 1>
                        suffix_op: 
                          (StringUnary
                            op_id: VTest_ColonHyphen
                            arg_word: {($ VSub_Name '$_Dbg_program_exit_code')}
                          )
                        spids: [95 99]
                      )
                    }
                  spids: [94]
                )
              ]
              spids: [90]
            )
            (Assignment
              keyword: Assign_Typeset
              flags: [-i]
              pairs: [
                (assign_pair
                  lhs: (LhsName name:desired_quit_levels)
                  op: Equal
                  rhs: 
                    {
                      (BracedVarSub
                        token: <VSub_Number 2>
                        suffix_op: (StringUnary op_id:VTest_ColonHyphen arg_word:{(0)})
                        spids: [108 112]
                      )
                    }
                  spids: [107]
                )
              ]
              spids: [103]
            )
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_DPipe
                              left: 
                                (ArithBinary
                                  op_id: Arith_DEqual
                                  left: (ArithVarRef name:desired_quit_levels)
                                  right: (ArithWord w:{(Lit_Digits 0)})
                                )
                              right: 
                                (ArithBinary
                                  op_id: Arith_Great
                                  left: (ArithVarRef name:desired_quit_levels)
                                  right: 
                                    (ArithBinary
                                      op_id: Arith_Plus
                                      left: (ArithVarRef name:BASH_SUBSHELL)
                                      right: (ArithWord w:{(Lit_Digits 1)})
                                    )
                                )
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (DParen
                      child: 
                        (BinaryAssign
                          op_id: Arith_Equal
                          left: (LhsName name:desired_quit_levels)
                          right: 
                            (ArithBinary
                              op_id: Arith_Plus
                              left: (ArithVarRef name:BASH_SUBSHELL)
                              right: (ArithWord w:{(Lit_Digits 1)})
                            )
                        )
                    )
                  ]
                  spids: [16777215 142]
                )
              ]
              spids: [16777215 155]
            )
            (DParen
              child: 
                (BinaryAssign
                  op_id: Arith_PlusEqual
                  left: (LhsName name:_Dbg_QUIT_LEVELS)
                  right: (ArithVarRef name:desired_quit_levels)
                )
            )
            (DParen
              child: (UnaryAssign op_id:Node_PostDMinus child:(LhsName name:_Dbg_QUIT_LEVELS))
            )
            (C {(_Dbg_write_journal)} {(DQ ('_Dbg_QUIT_LEVELS=') ($ VSub_Name '$_Dbg_QUIT_LEVELS'))})
            (C {(_Dbg_write_journal)} {(DQ ('_Dbg_step_ignore=') ($ VSub_Name '$_Dbg_step_ignore'))})
            (If
              arms: [
                (if_arm
                  cond: [
                    (Sentence
                      child: 
                        (DParen
                          child: 
                            (ArithBinary
                              op_id: Arith_DEqual
                              left: (ArithVarRef name:BASH_SUBSHELL)
                              right: (ArithWord w:{(Lit_Digits 0)})
                            )
                        )
                      terminator: <Op_Semi ';'>
                    )
                  ]
                  action: [
                    (If
                      arms: [
                        (if_arm
                          cond: [
                            (Sentence
                              child: 
                                (C {(Lit_Other '[')} {(-n)} {(DQ ($ VSub_Name '$_Dbg_RESTART_COMMAND'))} 
                                  {(Lit_Other ']')}
                                )
                              terminator: <Op_Semi ';'>
                            )
                          ]
                          action: [
                            (C {(_Dbg_erase_journals)})
                            (C {(_Dbg_save_state)})
                            (C {(exec)} {($ VSub_Name '$_Dbg_RESTART_COMMAND')})
                          ]
                          spids: [16777215 250]
                        )
                      ]
                      spids: [16777215 264]
                    )
                    (C {(_Dbg_msg)} {(DQ (${ VSub_Name _Dbg_debugger_name) (": That's all, folks..."))})
                    (C {(_Dbg_cleanup)})
                    (AndOr
                      children: [
                        (DParen child:(ArithVarRef name:_Dbg_set_history))
                        (C {(history)} {(-w)} {($ VSub_Name '$_Dbg_histfile')})
                      ]
                      op_id: Op_DAmp
                    )
                  ]
                  spids: [16777215 228]
                )
              ]
              spids: [16777215 301]
            )
            (C {(trap)} {(-)} {(DEBUG)})
            (C {(trap)} {(DQ (_Dbg_cleanup2))} {(EXIT)})
            (C {(exit)} {($ VSub_Name '$return_code')})
          ]
          spids: [87]
        )
      spids: [83 86]
    )
    (C {(_Dbg_alias_add)} {(q)} {(quit)})
    (C {(_Dbg_alias_add)} {(q) (KW_Bang '!')} {(quit)})
    (C {(_Dbg_alias_add)} {(exit)} {(quit)})
  ]
)