gut analyzer by moving the arity check to the typechecker

This commit is contained in:
2026-03-19 13:16:34 +01:00
parent 2d2a2c667f
commit e24763dfb6
3 changed files with 38 additions and 180 deletions

View File

@@ -46,10 +46,7 @@ fn compile_file(args: Args) -> Result<(), ZernError> {
let mut analyzer = analyzer::Analyzer::new();
for stmt in &statements {
analyzer.register_function(stmt)?;
}
for stmt in &statements {
analyzer.analyze_stmt(stmt)?;
analyzer.register_declaration(stmt)?;
}
let mut typechecker = typechecker::TypeChecker::new(&analyzer);