Crate swc_ecma_utils[][src]


pub use self::ident::id;
pub use self::ident::Id;
pub use self::value::Type::Bool as BoolType;
pub use self::value::Type::Null as NullType;
pub use self::value::Type::Num as NumberType;
pub use self::value::Type::Obj as ObjectType;
pub use self::value::Type::Str as StringType;
pub use self::value::Type::Symbol as SymbolType;
pub use self::value::Type::Undefined as UndefinedType;
pub use self::value::Value::Known;
pub use self::value::Value::Unknown;
pub use self::Purity::MayBeImpure;
pub use self::Purity::Pure;



Creates a member expression.

Shortcut for quote_ident!(span.apply_mark(Mark::fresh(Mark::root())), s)


Finds all binding idents of variables.

Finds usage of ident


Type of value.

Runtime value.


Used for error reporting in transform.


Extension methods for Expr.

Extension methods for Expr.


Used to determine super_class_ident

Returns (ident, aliased)

Collects binding identifiers.

Collects binding identifiers, but only if it has a context which is identical to ctxt.

Add side effects of expr to to. Thie function preserves order and conditions. (think a() ? yield b() : c())

Extracts hoisted variables

Finds all binding idents of node.

Check if e is ...arguments

inject branch after directives

inject stmts after directives

make a new expression which evaluates val preserving side effects, if any.

Similar to prop_name_to_expr, but used for value position.

Replace all from in expr with to.

Cast to javascript’s int32

Type Definitions