Module rename
Available on crate feature
__ecma
and (crate features __ecma_transforms
or __testing_transform
) only.Traits§
- Renamed
Variable - A trait that is used to represent a renamed variable. For
renamer_keep_contexts
, the syntax contexts of the replacements should be correct (unique), while forhygiene
(which callsrenamer
), the resulting syntax contexts are irrelevant. This type is used to handle both cases without code duplication by usingHashMap<Id, impl RenamedVariable>
everywhere: - Renamer
Functions§
- contains_
eval - rename
- rename_
with_ config - renamer
- renamer_
keep_ contexts - Create correct (unique) syntax contexts. Use this if you need the syntax
contexts produces by this pass (unlike the default
hygiene
pass which removes them anyway.)