Skip to main content

main_program

Function main_program 

Source
pub fn main_program(
    entry: &str,
    source: Option<String>,
    is_main: bool,
) -> Vec<Stmt>
Expand description

The statements that run an ES module ENTRY point: one call that loads and links its graph and queues its evaluation (esm_loader.js runMain).

entry is the module’s file; source, when given, is its text — the [eval1] module node -e and piped stdin run has no file behind it. is_main is import.meta.main, true only for a file entry point.