(
ast: &ast::ModModule,
source_file: SourceFile,
opts: CompileOpts,
)
| 292 | } |
| 293 | |
| 294 | pub fn compile_block_expression( |
| 295 | ast: &ast::ModModule, |
| 296 | source_file: SourceFile, |
| 297 | opts: CompileOpts, |
| 298 | ) -> CompileResult<CodeObject> { |
| 299 | let symbol_table = SymbolTable::scan_program(ast, source_file.clone()) |
| 300 | .map_err(|e| e.into_codegen_error(source_file.name().to_owned()))?; |
| 301 | let mut compiler = Compiler::new(opts, source_file, "<module>".to_owned()); |
| 302 | compiler.compile_block_expr(&ast.body, symbol_table)?; |
| 303 | let code = compiler.exit_scope(); |
| 304 | trace!("Compilation completed: {code:?}"); |
| 305 | Ok(code) |
| 306 | } |
| 307 | |
| 308 | pub fn compile_expression( |
| 309 | ast: &ast::ModExpression, |
no test coverage detected