huge refactor, can now define structs out of order

This commit is contained in:
2025-04-11 01:57:10 -04:00
parent f6a6761262
commit 31c16a263b
24 changed files with 765 additions and 566 deletions
+5 -2
View File
@@ -1,9 +1,9 @@
use crate::common::{CompilerMsg, CompilerOutput, FileSpan};
use super::{IRUProgram, Type};
use super::{Type, UProgram};
impl CompilerOutput {
pub fn check_assign(&mut self, p: &IRUProgram, src: &Type, dest: &Type, span: FileSpan) {
pub fn check_assign(&mut self, p: &UProgram, src: &Type, dest: &Type, span: FileSpan) -> bool {
// TODO: spans
if src != dest {
self.err(CompilerMsg {
@@ -14,6 +14,9 @@ impl CompilerOutput {
),
spans: vec![span],
});
true
} else {
false
}
}
}