mirror of
https://github.com/oxc-project/oxc.git
synced 2026-09-14 19:36:11 +08:00
c90f0535c2
close #16100
25 lines
603 B
Rust
25 lines
603 B
Rust
mod array_join;
|
|
mod is_int32_or_uint32;
|
|
mod is_literal_value;
|
|
mod is_pure_function;
|
|
mod may_have_side_effects;
|
|
mod may_have_side_effects_statements;
|
|
mod prop_name;
|
|
mod to_boolean;
|
|
mod to_number;
|
|
mod to_string;
|
|
mod value_type;
|
|
|
|
use oxc_ast::ast::IdentifierReference;
|
|
use oxc_ecmascript::GlobalContext;
|
|
|
|
struct GlobalReferenceInformation {
|
|
is_undefined_shadowed: bool,
|
|
}
|
|
|
|
impl<'a> GlobalContext<'a> for GlobalReferenceInformation {
|
|
fn is_global_reference(&self, ident: &IdentifierReference<'a>) -> bool {
|
|
if ident.name == "undefined" { !self.is_undefined_shadowed } else { false }
|
|
}
|
|
}
|