#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum TokenType {
Normal,
Keyword,
Type,
String,
Number,
Comment,
Function,
Operator,
Macro,
Attribute,
}
#[derive(Debug, Clone)]
pub struct Token {
pub text: String,
pub token_type: TokenType,
}
impl Token {
pub fn new(text: impl Into<String>, token_type: TokenType) -> Self {
Self {
text: text.into(),
token_type,
}
}
}