Update token macros

This commit is contained in:
Kai-Philipp Nosper 2022-02-08 23:26:23 +01:00
parent 926bdeb2dc
commit fdef796440

View File

@ -191,17 +191,17 @@ macro_rules! T {
}; };
// Literals // Literals
[i64($val:tt)] => { [i64($($val:tt)*)] => {
crate::token::Token::Literal(crate::token::Literal::I64($val)) crate::token::Token::Literal(crate::token::Literal::I64($($val)*))
}; };
[str($val:tt)] => { [str($($val:tt)*)] => {
crate::token::Token::Literal(crate::token::Literal::String($val)) crate::token::Token::Literal(crate::token::Literal::String($($val)*))
}; };
// Ident // Ident
[ident($val:tt)] => { [ident($($val:tt)*)] => {
crate::token::Token::Ident($val) crate::token::Token::Ident($($val)*)
}; };
// Combo crate::token::Tokens // Combo crate::token::Tokens