Module swc_plugin::utils
source · [−]Modules
Utilities for the swc project
Macros
Creates a member expression.
Shortcut for quote_ident!(span.apply_mark(Mark::fresh(Mark::root())), s)
Supported output types
Creates a Box<Expr>
from the source code.
Structs
Finds all binding idents of variables.
Finds usage of ident
Enums
Statics
Used for error reporting in transform.
Traits
Extension methods for Expr.
Not a public API.
Functions
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
.
This does not recurse into a function if this
is changed by it.
Add side effects of expr
to to
.
This 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