14 lines
331 B
Rust
14 lines
331 B
Rust
use crate::model::{CompilerError, Program};
|
|
|
|
mod dsa;
|
|
|
|
pub fn compiler_backend(ext: &str, ast: &Program) -> Result<String, CompilerError> {
|
|
match ext {
|
|
"dsa" => Ok(dsa::generate_code(ast)?),
|
|
_ => Err(CompilerError::Generic(format!(
|
|
"File type {} not supported",
|
|
ext
|
|
))),
|
|
}
|
|
}
|