Function swc_compiler_base::parse_js
source · pub fn parse_js(
_cm: Lrc<SourceMap>,
fm: Lrc<SourceFile>,
handler: &Handler,
target: EsVersion,
syntax: Syntax,
is_module: IsModule,
comments: Option<&dyn Comments>
) -> Result<Program, Error>
Expand description
This method parses a javascript / typescript file
This should be called in a scope of [swc_common::GLOBALS].