use std::result;
use thiserror::Error;
pub type Result<T> = result::Result<T, Error>;
#[derive(Error, Debug)]
pub enum Error {
#[error("{0}")]
Syntax(String),
#[error("{0}")]
UndefVariable(String),
#[error("{0}")]
Backref(String),
#[error("{0}")]
DuplicateDef(String),
#[error("{0}")]
Regex(#[from] regex::Error),
}