updated compiler to support multiple frontends and backends

This commit is contained in:
2026-02-05 01:09:14 +00:00
parent 8d130a870c
commit a35cfbe864
14 changed files with 1737 additions and 324 deletions
+13
View File
@@ -0,0 +1,13 @@
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
))),
}
}