Function swc_ecma_parser::parse_file_as_script

source ยท
pub fn parse_file_as_script(
    fm: &SourceFile,
    syntax: Syntax,
    target: EsVersion,
    comments: Option<&dyn Comments>,
    recovered_errors: &mut Vec<Error>,
) -> PResult<Script>
Expand description

Note: This is recommended way to parse a file.

This is an alias for Parser, Lexer and SourceFileInput, but instantiation of generics occur in swc_ecma_parser crate.