Struct swc::Compiler[][src]

pub struct Compiler {
    pub cm: Arc<SourceMap>,
    pub handler: Arc<Handler>,
    // some fields omitted
}

Fields

cm: Arc<SourceMap>

CodeMap

handler: Arc<Handler>

Implementations

These are low-level apis.

Runs op in current compiler’s context.

Note: Other methods of Compiler already uses this internally.

This method parses a javascript / typescript file

Converts ast node to source string and sourcemap.

This method receives target file path, but does not write file to the path. See: https://github.com/swc-project/swc/issues/1255

High-level apis.

This method returns None if a file should be skipped.

This method handles merging of config.

This method does not parse module.

custom_after_pass is applied after swc transforms are applied.

You can use custom pass with this method.

There exists a PassBuilder to help building custom passes.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.