Skip to main content

Module parser

Module parser 

Source

Functions§

parse
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.