pochoir-common 0.12.2

Common utilities for the pochoir template engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use thiserror::Error;

use crate::Spanned;

pub type Result<T> = std::result::Result<T, Spanned<Error>>;

#[derive(Error, Debug, PartialEq, Eq, Clone)]
pub enum Error {
    #[error("unexpected end of input")]
    UnexpectedEoi,

    #[error("expected {expected:?}, found end of input")]
    ExpectedFoundEoi { expected: String },

    #[error("expected {expected:?}, found {found:?}")]
    UnexpectedInput { expected: String, found: String },
}