Skip to main content

parse

Function parse 

Source
pub fn parse<'a>(allocator: &'a Allocator, source: &'a str) -> Program<'a>
Expand description

Parse JS source text. Always parses in module mode: oxc handles plain scripts (no import/export) correctly in module mode too — program.body simply contains no import/export statements. This lets codegen read import/export directly from the AST instead of pre-scanning the raw source text.