Update token macros
This commit is contained in:
parent
926bdeb2dc
commit
fdef796440
12
src/token.rs
12
src/token.rs
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user