use std::fmt::{Display, Formatter, Result};
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub enum TokenType {
    Write,
    InputString,
    InputNumber,
    LeftBrace,
    RightBrace,
    If,
    Else,
    Loop,
    Assignment,
    Plus,
    Minus,
    Product,
    Divide,
    Modulo,
    GreaterThan,
    LessThan,
    EqualTo,
    NotEqual,
    SemiColon,
    OpenParantheses,
    CloseParantheses,
    Um,
    Nekal,
    Comma,
    AngleOpen,
    AngleClose,
    Literal(usize),
    Integer(i64),
    Float(f64),
    Symbol(usize),
    Return,
    IfGreaterThan,
    IfNotEqual,
    IfLessThan,
    IfEqualTo,
    SquareOpen,
    SquareClose,
}

impl Display for TokenType {
    fn fmt(&self, f: &mut Formatter<'_>) -> Result {
        match self {
            TokenType::Write => write!(f, "ezhuthuka"),
            TokenType::InputString => write!(f, "vachaakam_vangikuga"),
            TokenType::InputNumber => write!(f, "akam_vangikuga"),
            TokenType::LeftBrace => write!(f, "{{"),
            TokenType::RightBrace => write!(f, "}}"),
            TokenType::If => write!(f, "enkil"),
            TokenType::Else => write!(f, "adhallengil"),
            TokenType::Loop => write!(f, "aavarthikuga"),
            TokenType::Assignment => write!(f, "="),
            TokenType::Plus => write!(f, "+"),
            TokenType::Minus => write!(f, "-"),
            TokenType::Product => write!(f, "*"),
            TokenType::Divide => write!(f, "/"),
            TokenType::Modulo => write!(f, "%"),
            TokenType::GreaterThan => write!(f, "veluthan"),
            TokenType::LessThan => write!(f, "cheruthan"),
            TokenType::EqualTo => write!(f, "thullyaman"),
            TokenType::NotEqual => write!(f, "thullyamalla"),
            TokenType::SemiColon => write!(f, ";"),
            TokenType::OpenParantheses => write!(f, "("),
            TokenType::CloseParantheses => write!(f, ")"),
            TokenType::Um => write!(f, "um"),
            TokenType::Nekal => write!(f, "ne_kal"),
            TokenType::Literal(literal) => write!(f, "{}", literal),
            TokenType::Integer(number) => write!(f, "{}", number),
            TokenType::Float(number) => write!(f, "{}", number),
            TokenType::Symbol(symbol) => write!(f, "{}", symbol),
            TokenType::Comma => write!(f, ","),
            TokenType::Return => write!(f, "kodukuga"),
            TokenType::AngleOpen => write!(f, "<"),
            TokenType::AngleClose => write!(f, ">"),
            TokenType::IfGreaterThan => write!(f, "veluthanenkil"),
            TokenType::IfNotEqual => write!(f, "thullyamallenkil"),
            TokenType::IfLessThan => write!(f, "cheruthanenkil"),
            TokenType::IfEqualTo => write!(f, "thullyamanenkil"),
            TokenType::SquareOpen => write!(f, "["),
            TokenType::SquareClose => write!(f, "]"),
        }
    }
}
