]> Repositorios git - scryer-prolog.git/commitdiff
Use from_str_radix for BigInt in parse_integer_by_radix (#3025, #3033)
authorMark Thom <[email protected]>
Fri, 22 Aug 2025 00:34:21 +0000 (17:34 -0700)
committerMark Thom <[email protected]>
Fri, 22 Aug 2025 01:25:00 +0000 (18:25 -0700)
src/parser/lexer.rs

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