Skip to main content

pochoir_common/
error.rs

1use thiserror::Error;
2
3use crate::Spanned;
4
5pub type Result<T> = std::result::Result<T, Spanned<Error>>;
6
7#[derive(Error, Debug, PartialEq, Eq, Clone)]
8pub enum Error {
9    #[error("unexpected end of input")]
10    UnexpectedEoi,
11
12    #[error("expected {expected:?}, found end of input")]
13    ExpectedFoundEoi { expected: String },
14
15    #[error("expected {expected:?}, found {found:?}")]
16    UnexpectedInput { expected: String, found: String },
17}