use std::num::{ParseFloatError, ParseIntError};
#[derive(thiserror::Error, Debug, PartialEq, Clone, Default)]
pub enum LexerError {
#[default]
#[error("Unknown lexer error.")]
Unknown,
#[error("Invalid escape sequence: {0}")]
InvalidEscape(String),
#[error("Invalid interpolation")]
Interpolation,
#[error("Unterminated string literal")]
UnterminatedString,
#[error("Invalid integer literal. {0}")]
Int(#[from] ParseIntError),
#[error("Invalid float literal. {0}")]
Float(#[from] ParseFloatError),
#[error(
"Invalid dice syntax. If you're wondering why you can't create 1 mil dice with 1 mil faces: we only support up to 255 sides/count"
)]
InvalidDice,
}