use crate::diagnostic::span::Span;

pub struct Type {
    span: Span,
    kind: TypeKind,
}

pub enum TypeKind {
    Builtin(BuiltinType),
    Array(ArrayType),
}

pub struct BuiltinType {
    span: Span,
    kind: BuiltinTypeKind,
}

pub enum BuiltinTypeKind {
    Int,
    Void,
}

pub struct ArrayType {
    span: Span,
    element_type: Box<Type>,
    dimensions: Vec<ArrayDimension>,
}

pub struct ArrayDimension {
    span: Span,
    size: Option<Expr>,
}