(int: &ast::Int)
| 10508 | } |
| 10509 | |
| 10510 | pub fn ruff_int_to_bigint(int: &ast::Int) -> Result<BigInt, CodegenErrorType> { |
| 10511 | if let Some(small) = int.as_u64() { |
| 10512 | Ok(BigInt::from(small)) |
| 10513 | } else { |
| 10514 | parse_big_integer(int) |
| 10515 | } |
| 10516 | } |
| 10517 | |
| 10518 | /// Converts a `ruff` ast integer into a `BigInt`. |
| 10519 | /// Unlike small integers, big integers may be stored in one of four possible radix representations. |
no test coverage detected