mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
feat(ecmascript): add feature flag for constant evaluation
This commit is contained in:
parent
8e4f6368f8
commit
15c04e5cbb
3 changed files with 8 additions and 3 deletions
|
|
@ -27,3 +27,8 @@ oxc_syntax = { workspace = true, features = ["to_js_string"] }
|
||||||
|
|
||||||
num-bigint = { workspace = true }
|
num-bigint = { workspace = true }
|
||||||
num-traits = { workspace = true }
|
num-traits = { workspace = true }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = []
|
||||||
|
side_effects = []
|
||||||
|
constant_evaluation = ["side_effects"]
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,10 @@ mod to_int_32;
|
||||||
mod to_number;
|
mod to_number;
|
||||||
mod to_string;
|
mod to_string;
|
||||||
|
|
||||||
// Constant Evaluation
|
#[cfg(feature = "constant_evaluation")]
|
||||||
pub mod constant_evaluation;
|
pub mod constant_evaluation;
|
||||||
|
|
||||||
// Side Effects
|
#[cfg(feature = "side_effects")]
|
||||||
pub mod side_effects;
|
pub mod side_effects;
|
||||||
|
|
||||||
pub use self::{
|
pub use self::{
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ doctest = false
|
||||||
oxc_allocator = { workspace = true }
|
oxc_allocator = { workspace = true }
|
||||||
oxc_ast = { workspace = true }
|
oxc_ast = { workspace = true }
|
||||||
oxc_codegen = { workspace = true }
|
oxc_codegen = { workspace = true }
|
||||||
oxc_ecmascript = { workspace = true }
|
oxc_ecmascript = { workspace = true, features = ["constant_evaluation"] }
|
||||||
oxc_mangler = { workspace = true }
|
oxc_mangler = { workspace = true }
|
||||||
oxc_parser = { workspace = true }
|
oxc_parser = { workspace = true }
|
||||||
oxc_semantic = { workspace = true }
|
oxc_semantic = { workspace = true }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue