(command.AndOr
  ops: [Id.Op_DAmp]
  children: [
    (command.ShFunction
      name: _gendiff
      body: 
        (command.BraceGroup
          children: [
            (C {<local>} {<cur>} {<prev>} {<words>} {<cword>})
            (command.AndOr
              ops: [Id.Op_DPipe]
              children: [
                (C {<_init_completion>} {<-o>} {(SQ <'@(diff|patch)'>)})
                (command.ControlFlow token:<Id.ControlFlow_Return return>)
              ]
            )
            (command.AndOr
              ops: [Id.Op_DAmp]
              children: [
                (command.DBracket
                  expr: 
                    (bool_expr.Binary
                      op_id: Id.BoolBinary_eq
                      left: {($ Id.VSub_DollarName '$cword')}
                      right: {<1>}
                    )
                )
                (C {<_filedir>} {<-d>})
              ]
            )
          ]
        )
    )
    (C {<complete>} {<-F>} {<_gendiff>} {<gendiff>})
  ]
)