use crate::source_map::Location;
pub type SourceLocation = Option<Location>;
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub enum Type {
Int,
Int32,
Uint,
Float,
Bool,
String,
Custom(String),
Generic(String), Parameterized(String, Vec<Type>), Associated(String, String), TraitObject(String), ImplTrait(String), Option(Box<Type>),
Result(Box<Type>, Box<Type>),
Vec(Box<Type>), Array(Box<Type>, usize), Reference(Box<Type>),
MutableReference(Box<Type>),
RawPointer {
mutable: bool,
pointee: Box<Type>,
}, Tuple(Vec<Type>), Infer, FunctionPointer {
params: Vec<Type>,
return_type: Option<Box<Type>>,
}, }
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct TypeParam {
pub name: String,
pub bounds: Vec<String>, }
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
pub struct AssociatedType {
pub name: String, pub concrete_type: Option<Type>, }