Skip to content

Commit

Permalink
fix arg type in macro
Browse files Browse the repository at this point in the history
  • Loading branch information
vic1707 committed Oct 31, 2023
1 parent 12b7808 commit 62a76ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/token/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ impl<'a> Function<'a> {
#[macro_export]
macro_rules! xprs_fn {
// variadics
($name:literal, $function:expr) => {
($name:expr, $function:expr) => {
$crate::Function::new($name, $function, None)
};
($function:expr) => {
$crate::Function::new(stringify!($function), $function, None)
};
// fixed args
($name:literal, $function:expr, $nb_args:tt) => {
($name:expr, $function:expr, $nb_args:tt) => {
$crate::Function::new(
$name,
$crate::xprs_fn!(wrap $function, $nb_args),
Expand Down

0 comments on commit 62a76ad

Please sign in to comment.