(self, other)
| 70 | return BinOp(BinOpKind.ADD, self, other, self.type) |
| 71 | |
| 72 | def __sub__(self, other): |
| 73 | other = self._to_expr(other) |
| 74 | # Pointer - int -> PTR_SUB |
| 75 | if self.type.is_pointer(): |
| 76 | if isinstance(other.type, IntType): |
| 77 | return BinOp(BinOpKind.PTR_SUB, self, other, self.type) |
| 78 | else: |
| 79 | raise ValueError(f"Can't sub pointer with value of {other.type} type.") |
| 80 | # Regular subtraction |
| 81 | return BinOp(BinOpKind.SUB, self, other, self.type) |
| 82 | |
| 83 | def __mul__(self, other): |
| 84 | other = self._to_expr(other) |
nothing calls this directly
no test coverage detected