|
|
|
@ -1,7 +1,7 @@ |
|
|
|
|
use std::{collections::HashMap, convert::From}; |
|
|
|
|
|
|
|
|
|
use crate::{ |
|
|
|
|
ast::TypeIdentifier, |
|
|
|
|
ast::{TypeIdentifier, AST}, |
|
|
|
|
identifier::{define_id_kind, Id, IdStore}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -96,6 +96,11 @@ impl TypeContext { |
|
|
|
|
pub fn lookup_type(&self, type_id: &TypeId) -> Option<&DefinedType> { |
|
|
|
|
self.defined_types.get(type_id) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//TODO return some kind of overall type later?
|
|
|
|
|
pub fn typecheck(&mut self, ast: &AST) -> Result<(), TypeError> { |
|
|
|
|
Ok(()) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// A type defined in program source code, as opposed to a builtin.
|
|
|
|
|