mirror of
https://github.com/RustPython/Parser.git
synced 2025-08-28 06:14:56 +00:00
Replace num-bigint with malachite-bigint (#18)
Co-authored-by: Jeong YunWon <jeong@youknowone.org>
This commit is contained in:
parent
5e9e8a7589
commit
a2e3209c42
16 changed files with 51 additions and 37 deletions
|
@ -8,7 +8,7 @@ repository = "https://github.com/RustPython/Parser/"
|
|||
license = "MIT"
|
||||
|
||||
[features]
|
||||
default = ["location"]
|
||||
default = ["location", "malachite-bigint"]
|
||||
constant-optimization = ["fold"]
|
||||
location = ["fold", "rustpython-parser-core/location"]
|
||||
fold = []
|
||||
|
@ -21,7 +21,6 @@ rustpython-parser-core = { workspace = true }
|
|||
rustpython-literal = { workspace = true, optional = true }
|
||||
|
||||
is-macro = { workspace = true }
|
||||
num-bigint = { workspace = true }
|
||||
num-bigint = { workspace = true, optional = true }
|
||||
malachite-bigint = { workspace = true, optional = true }
|
||||
static_assertions = "1.1.0"
|
||||
|
||||
pyo3 = { workspace = true, optional = true, features = ["num-bigint", "num-complex"] }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
//! `builtin_types` in asdl.py and Attributed
|
||||
|
||||
use num_bigint::BigInt;
|
||||
use crate::bigint::BigInt;
|
||||
|
||||
pub type String = std::string::String;
|
||||
|
||||
|
|
|
@ -14,6 +14,11 @@ mod ranged;
|
|||
#[cfg(feature = "unparse")]
|
||||
mod unparse;
|
||||
|
||||
#[cfg(feature = "malachite-bigint")]
|
||||
pub use malachite_bigint as bigint;
|
||||
#[cfg(feature = "num-bigint")]
|
||||
pub use num_bigint as bigint;
|
||||
|
||||
pub use builtin::*;
|
||||
pub use generic::*;
|
||||
pub use ranged::Ranged;
|
||||
|
|
|
@ -55,7 +55,7 @@ impl<U> crate::fold::Fold<U> for ConstantOptimizer {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use num_bigint::BigInt;
|
||||
use crate::bigint::BigInt;
|
||||
use rustpython_parser_core::text_size::TextRange;
|
||||
|
||||
#[cfg(feature = "constant-optimization")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue