Helper to add two native integers. The result has the type of lhs.
(self, lhs: Value, rhs: Value | int)
| 2510 | return self.add(FloatComparisonOp(lhs, rhs, op, line)) |
| 2511 | |
| 2512 | def int_add(self, lhs: Value, rhs: Value | int) -> Value: |
| 2513 | """Helper to add two native integers. |
| 2514 | |
| 2515 | The result has the type of lhs. |
| 2516 | """ |
| 2517 | if isinstance(rhs, int): |
| 2518 | rhs = Integer(rhs, lhs.type) |
| 2519 | return self.int_op(lhs.type, lhs, rhs, IntOp.ADD, lhs.line) |
| 2520 | |
| 2521 | def int_sub(self, lhs: Value, rhs: Value | int) -> Value: |
| 2522 | """Helper to subtract a native integer from another one. |
no test coverage detected