Use from_str_radix for BigInt in parse_integer_by_radix (#3025, #3033)

This commit is contained in:
Mark Thom
2025-08-21 17:34:21 -07:00
parent 7ffd93c0d7
commit c5389dbbf2

View File

@@ -714,8 +714,7 @@ impl<'a, R: CharRead> Lexer<'a, R> {
}) })
}) })
.or_else(|_| { .or_else(|_| {
token Integer::from_str_radix(token, radix)
.parse::<Integer>()
.map(|n| Number::BigInt(arena_alloc!(n, &mut self.machine_st.arena))) .map(|n| Number::BigInt(arena_alloc!(n, &mut self.machine_st.arena)))
.map_err(|_| ParserError::ParseBigInt(self.line_num, self.col_num)) .map_err(|_| ParserError::ParseBigInt(self.line_num, self.col_num))
}) })