(
ast: &ast::ModExpression,
source_file: SourceFile,
opts: CompileOpts,
)
| 306 | } |
| 307 | |
| 308 | pub fn compile_expression( |
| 309 | ast: &ast::ModExpression, |
| 310 | source_file: SourceFile, |
| 311 | opts: CompileOpts, |
| 312 | ) -> CompileResult<CodeObject> { |
| 313 | let symbol_table = SymbolTable::scan_expr(ast, source_file.clone()) |
| 314 | .map_err(|e| e.into_codegen_error(source_file.name().to_owned()))?; |
| 315 | let mut compiler = Compiler::new(opts, source_file, "<module>".to_owned()); |
| 316 | compiler.compile_eval(ast, symbol_table)?; |
| 317 | let code = compiler.exit_scope(); |
| 318 | Ok(code) |
| 319 | } |
| 320 | |
| 321 | macro_rules! emit { |
| 322 | // Struct variant with single identifier (e.g., Foo::A { arg }) |
no test coverage detected