- C frontend broken for now

- If statements work properly now (hopefully)
- still issues with while loops pushing vars to the stack. need scoping
  implemented to fix this!

- refactored registers.rs and fixed faulty logic.
- made register allocation optimisations
This commit is contained in:
2026-02-08 00:14:18 +00:00
parent e9329eca95
commit 6699333b2c
9 changed files with 745 additions and 232 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
use crate::model::{CompilerError, Program};
mod c;
// mod c;
mod dsc;
pub fn compiler_frontend(ext: &str, data: &str) -> Result<Program, CompilerError> {
match ext {
"dsc" => Ok(dsc::generate_ast(&data)?),
"c" => Ok(c::generate_ast(&data)?),
// "c" => Ok(c::generate_ast(&data)?),
_ => Err(CompilerError::Generic(format!(
"File type {} not supported",
ext