pub fn compile(
        ast: &Ast,
        settings: CompilerSettings,
    ) -> Result<(Vec<u8>, DebugInfo), CompilerError> {
        let mut compiler = Compiler {
            settings,
            ..Default::default()
        };

        if let Some(entry_point) = ast.entry_point() {
            compiler.compile_node(ResultRegister::None, entry_point, ast)?;
        }

        Ok((compiler.bytes, compiler.debug_info))
    }
/// Compiles an [Ast]
///
/// Returns compiled bytecode along with corresponding debug information
Compiles an [Ast]
Returns compiled bytecode along with corresponding debug information
Compiles an [ Ast ] Returns compiled bytecode along with corresponding debug information
pub fn compile(
        ast: &Ast,
        settings: CompilerSettings,
    ) -> Result<(Vec<u8>, DebugInfo), CompilerError> {
        let mut compiler = Compiler {
            settings,
            ..Default::default()
        };
        if let Some(entry_point) = ast.entry_point() {
            compiler.compile_node(ResultRegister::None, entry_point, ast)?;
        }
        Ok((compiler.bytes, compiler.debug_info))
    }
pub fn compile ( ast : & Ast , settings : CompilerSettings , ) -> Result < ( Vec < u8 > , DebugInfo ) , CompilerError > { let mut compiler = Compiler { settings , .. Default :: default ( ) } ; if let Some ( entry_point ) = ast . entry_point ( ) { compiler . compile_node ( ResultRegister :: None , entry_point , ast ) ? ; } Ok ( ( compiler . bytes , compiler . debug_info ) ) }
Compiles an [Ast]
Returns compiled bytecode along with corresponding debug information
Compiles an [ Ast ] Returns compiled bytecode along with corresponding debug information
ast
&Ast
settings
CompilerSettings
ast
&Ast
settings
CompilerSettings