- 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:
@@ -2,11 +2,11 @@ use common::logging::log;
|
||||
|
||||
use crate::model::{CompilerError, Program};
|
||||
use parser::{ParseResult, Parser};
|
||||
use semantic_analyser::Analyser;
|
||||
// use semantic_analyser::Analyser;
|
||||
|
||||
pub mod lexer;
|
||||
pub mod parser;
|
||||
pub mod semantic_analyser;
|
||||
// pub mod semantic_analyser;
|
||||
|
||||
pub fn generate_ast(input: &str) -> Result<Program, CompilerError> {
|
||||
log("Tokenising Input...");
|
||||
@@ -30,8 +30,8 @@ pub fn generate_ast(input: &str) -> Result<Program, CompilerError> {
|
||||
log("Analyzing AST...");
|
||||
log("Checking Type Information...");
|
||||
|
||||
let analyser = Analyser::new();
|
||||
analyser.analyse(ast.clone()).unwrap();
|
||||
// let mut analyser = Analyser::new();
|
||||
// analyser.analyse(ast.clone()).unwrap();
|
||||
|
||||
log("Type Checking Complete...");
|
||||
Ok(ast)
|
||||
|
||||
Reference in New Issue
Block a user