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
[i64($val:tt)] => {
crate::token::Token::Literal(crate::token::Literal::I64($val))
[i64($($val:tt)*)] => {
crate::token::Token::Literal(crate::token::Literal::I64($($val)*))
};
[str($val:tt)] => {
crate::token::Token::Literal(crate::token::Literal::String($val))
[str($($val:tt)*)] => {
crate::token::Token::Literal(crate::token::Literal::String($($val)*))
};
// Ident
[ident($val:tt)] => {
crate::token::Token::Ident($val)
[ident($($val:tt)*)] => {
crate::token::Token::Ident($($val)*)
};
// Combo crate::token::Tokens