mul/src/typecheck.rs

21 lines
412 B
Rust

use crate::builtins::Builtin;
use crate::dictionary::Dictionary;
use crate::syntax::{Program, Type};
/// Typechecker state.
struct Typechecker {
environment: Dictionary<Type>,
}
impl Typechecker {
fn new() -> Self {
Typechecker {
environment: Builtin::type_dictionary(),
}
}
fn check_program(&mut self, program: &Program) -> Result<(), ()> {
Ok(())
}
}