blob: e0299d18055352045bec74e5a3a2449145a372b0 (
plain) (
tree)
|
|
use std::result;
use thiserror::Error;
use crate::ast::{Ident, Type};
#[derive(Debug, PartialEq, Eq, Error)]
pub enum Error {
#[error("Undefined variable {0}")]
UndefinedVariable(Ident<'static>),
#[error("Unexpected type {actual}, expected type {expected}")]
InvalidType { actual: Type, expected: Type },
}
pub type Result<T> = result::Result<T, Error>;
|