compile_with_external

Function compile_with_external 

Source
pub fn compile_with_external(
    source: &str,
    fns: &[Box<dyn Function>],
    external: &ExternalEnv,
    config: CompileConfig,
) -> Result
Expand description

Compiles the given source code with a specified external environment and configuration.

This function allows for customization of the compilation environment by providing an external state and a compilation configuration.

§Arguments

  • source - The source code to be compiled.
  • fns - A list of function definitions available during compilation.
  • external - An external environment providing additional context for compilation.
  • config - The compilation configuration settings.

§Returns

A Result containing the compiled program or a diagnostic errors.

§Errors

On compilation error, a list of diagnostics is returned.