Skip to content

Commit

Permalink
feat: add trailing comma support (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
avalsch authored Nov 15, 2023
1 parent 3bf7863 commit faaeec3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ macro_rules! static_detour {

// 6 — argument and return type (return/void)
(@parse_prototype
($($input:tt)*) | ($($argument_type:ty),*) -> $return_type:ty ; $($rest:tt)*) => {
($($input:tt)*) | ($($argument_type:ty),* $(,)?) -> $return_type:ty ; $($rest:tt)*) => {
$crate::static_detour!(
@parse_terminator ($($input)* ($($argument_type)*) ($return_type)) | ; $($rest)*);
};
(@parse_prototype ($($input:tt)*) | ($($argument_type:ty),*) $($rest:tt)*) => {
(@parse_prototype ($($input:tt)*) | ($($argument_type:ty),* $(,)?) $($rest:tt)*) => {
$crate::static_detour!(@parse_terminator ($($input)* ($($argument_type)*) (())) | $($rest)*);
};

Expand Down

0 comments on commit faaeec3

Please sign in to comment.