From d4715494116bccc6d1d3440814caba70e6f2afd3 Mon Sep 17 00:00:00 2001 From: Jason Travis Smith Date: Mon, 24 Jun 2019 22:32:21 -0400 Subject: [PATCH] Macro test. --- src/macros.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/macros.rs b/src/macros.rs index 96c1bbf..e359760 100644 --- a/src/macros.rs +++ b/src/macros.rs @@ -4,16 +4,22 @@ macro_rules! external_library { $name: ident : $link: expr => { - $(statics: - $($sname: ident: $stype: ty);+; + $(statics + { + $($sname: ident: $stype: ty);+ + } )|* - $(functions: - $($fname: ident($($farg: ident : $fargt: ty),*) -> $fret:ty);+; + $(functions + { + $($fname: ident($($farg: ident : $fargt: ty),*) -> $fret:ty);+ + } )|* $(varargs: - $($vname: ident($($vargs: ty),+) -> $vret: ty),+; + { + $($vname: ident($($vargs: ty),+) -> $vret: ty),+ + } )|* } } =>