use crate::model::{CompilerError, Program}; // mod c; mod dsc; pub fn compiler_frontend(ext: &str, data: &str) -> Result { match ext { "dsc" => Ok(dsc::generate_ast(&data)?), // "c" => Ok(c::generate_ast(&data)?), _ => Err(CompilerError::Generic(format!( "File type {} not supported", ext ))), } }