4ed5da259e
next commit will have it integrated if it works
12 lines
262 B
Rust
12 lines
262 B
Rust
use crate::model::{CompilerError, Program};
|
|
|
|
mod codegen;
|
|
mod instruction;
|
|
mod registers;
|
|
mod scope;
|
|
|
|
pub fn generate_code(ast: &Program) -> Result<String, CompilerError> {
|
|
let mut codegen = codegen::CodeGenerator::new(ast.clone());
|
|
codegen.generate()
|
|
}
|