use thiserror::Error;
pub type SourceResult<T> = Result<T, SourceError>;
#[derive(Debug, Error)]
pub enum SourceError {
#[error("Parse error: {0}")]
ParseError(String),
#[error("IO error: {0}")]
IoError(#[from] std::io::Error),
#[error("Invalid transformation: {0}")]
InvalidTransformation(String),
}
impl From<syn::Error> for SourceError {
fn from(err: syn::Error) -> Self {
SourceError::ParseError(err.to_string())
}
}