Skip to main content

compile_program

Function compile_program 

Source
pub fn compile_program(
    files: &mut dyn SourceFiles,
    sources: &[&str],
    options: &CompileOptions,
) -> Compiled
Expand description

Compile a program from its source files, which are put together in the order given.

Each source is read twice, as the reference compiler reads it: once to learn what it defines, and once more, knowing what all of them define, to generate its code. Then what was generated for each is made into one program.