pub fn compile_program_to<R: Read>(
reader: R,
package_index: &PackageIndex,
data_index: &DataIndex,
options: &ParserOptions,
stage: CompileStage,
) -> CompileResultExpand description
Runs the compiler passes in-order, up to the specified pass.
§Generic arguments
R: The Read-implementing type of thesourcetext.
§Arguments
reader: The reader that provides access to the source code to compile.package_index: The PackageIndex that is used to resolve imports.data_index: The DataIndex that is used to resolveData-structs.options: The ParserOptions with which we parse the given file.stage: The CompileStage up to which to run the pipeline. UseCompileStage::Allto do the entire thing.
§Returns
The compiled Workflow if it got that far, or else the compiled UnresolvedWorkflow or Program. Will also output a list of any warnings that may have occurred (empty list is good).
§Errors
This function may error if the program was ill-formed. Multiple errors are returned simultaneously per-stage.