MCPcopy Index your code
hub / github.com/RustPython/RustPython / ruff_int_to_bigint

Function ruff_int_to_bigint

crates/codegen/src/compile.rs:10510–10516  ·  view source on GitHub ↗
(int: &ast::Int)

Source from the content-addressed store, hash-verified

10508}
10509
10510pub 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.

Callers 3

ast_to_objectMethod · 0.85
compile_expressionMethod · 0.85

Calls 1

parse_big_integerFunction · 0.85

Tested by

no test coverage detected