The main crate of the swc project.
This is documentation for building custom build tools on top of swc.
See [testing] and swc_ecma_transform_testing.
It’s basically an interned string. See swc_atoms.
See swc_atoms for detailed description.
See swc_visit for detailed description.
See the doc on swc_ecma_ast::Ident or on swc_ecma_transforms_base::resolver::resolver_with_mark.
These methods are aware of the fact that
"use strict" directive should be
first in a file, and insert statements after directives.
Each stuffs are documented at itself.
The visitor expands to a lot of code. You can reduce it by using macros like
Note that this will make typescript-related nodes not processed, but it’s
typically fine as
typescript::strip is invoked at the start and it removes
pub extern crate swc_atoms as atoms;
pub extern crate swc_common as common;
pub extern crate swc_ecmascript as ecmascript;
pub use sourcemap;
All methods accept Handler, which is a storage for errors.
Builder is used to create a high performance
Multi-threaded implementation of Comments