use super::*;
use thiserror::Error;
#[derive(Error, Debug)]
pub enum ParseError {
#[error("The stream of tokens is empty")]
Empty,
#[error("Unrecognized token at {0}: {1}")]
Unrecognized(usize, String),
#[error("Expected {0}, but reached end of stream")]
ExpectButEnd(&'static str),
#[error("Unexpected {0}")]
Unexpected(Cow<'static, str>),
#[error("Expected {0}, but got {1}")]
ExpectButGot(Cow<'static, str>, Cow<'static, str>),
#[error("Positional args cannot be written after nominal args at {0}")]
PosArgAfterNomArg(usize),
}