

def transform_Assign(self, stmt):
    lhs_class = stmt.lhs.__class__
    rhs = self.transform_expr(stmt.rhs)
    if (lhs_class is Tuple):
        for (i, _) in enumerate(stmt.lhs.type.elt_types):
            lhs_i = self.tuple_proj(stmt.lhs, i)
            rhs_i = self.tuple_proj(rhs, i)
            assert (lhs_i.__class__ not in (ArrayView, Tuple))
            if (lhs_i.__class__ is Index):
                self.assign_index(lhs_i)
            else:
                assert (lhs_i.__class__ is Var), ('Unexpcted LHS %s : %s' % (lhs_i, lhs_i.type))
                self.assign(lhs_i, rhs_i)
        return None
    elif (lhs_class is Index):
        self.assign_index(stmt.lhs, rhs)
        return None
    else:
        stmt.rhs = rhs
        return stmt

dataset/ETHPy150Open iskandr/parakeet/parakeet/transforms/lower_slices.py LowerSlices.transform_Assign/original