diff --git a/src/branch/mod.rs b/src/branch/mod.rs index 2c19a65cb..babb5f2cb 100644 --- a/src/branch/mod.rs +++ b/src/branch/mod.rs @@ -212,7 +212,7 @@ macro_rules! permutation_trait_inner( } }; } - succ!($it, permutation_trait_inner!($self, $input, $res, $all_done, $($id)*)); + succ!($it, permutation_trait_inner!($self, $input, $res, $all_done, $($id)+)); }); ($it:tt, $self:expr, $input:ident, $res:expr, $all_done:expr, $head:ident) => ({ if $res.$it.is_none() { diff --git a/src/combinator/macros.rs b/src/combinator/macros.rs index aa164e258..1d70bda55 100644 --- a/src/combinator/macros.rs +++ b/src/combinator/macros.rs @@ -657,7 +657,7 @@ macro_rules! verify ( $crate::combinator::verify($f, $g)($i) ); ($i:expr, $f:expr, $submac:ident!( $($args:tt)* )) => ( - $crate::combinator::verify($f, |&o| $submac2!(o, $($args)*))($i) + $crate::combinator::verify($f, |&o| $submac!(o, $($args)*))($i) ); ); diff --git a/src/sequence/macros.rs b/src/sequence/macros.rs index edcbc5905..a5a335149 100644 --- a/src/sequence/macros.rs +++ b/src/sequence/macros.rs @@ -468,7 +468,7 @@ macro_rules! do_parse ( #[doc(hidden)] #[macro_export] macro_rules! nom_compile_error ( - (( $(args:tt)* )) => ( compile_error!($($args)*) ); + (( $($args:tt)* )) => ( compile_error!($($args)*) ); ); #[cfg(test)] diff --git a/src/whitespace.rs b/src/whitespace.rs index 9f1d1c7cf..9ed3f55aa 100644 --- a/src/whitespace.rs +++ b/src/whitespace.rs @@ -144,7 +144,7 @@ macro_rules! delimited_sep ( ($i:expr, $separator:path, $submac1:ident!( $($args1:tt)* ), $($rest:tt)+) => ({ use $crate::lib::std::result::Result::*; - match tuple_sep!($i, $separator, (), $submac1!($($args1)*), $($rest)*) { + match tuple_sep!($i, $separator, (), $submac1!($($args1)*), $($rest)+) { Err(e) => Err(e), Ok((remaining, (_,o,_))) => { Ok((remaining, o)) @@ -152,7 +152,7 @@ macro_rules! delimited_sep ( } }); ($i:expr, $separator:path, $f:expr, $($rest:tt)+) => ( - delimited_sep!($i, $separator, call!($f), $($rest)*); + delimited_sep!($i, $separator, call!($f), $($rest)+); ); ); @@ -162,7 +162,7 @@ macro_rules! separated_pair_sep ( ($i:expr, $separator:path, $submac1:ident!( $($args1:tt)* ), $($rest:tt)+) => ({ use $crate::lib::std::result::Result::*; - match tuple_sep!($i, $separator, (), $submac1!($($args1)*), $($rest)*) { + match tuple_sep!($i, $separator, (), $submac1!($($args1)*), $($rest)+) { Err(e) => Err(e), Ok((remaining, (o1,_,o2))) => { Ok((remaining, (o1,o2))) @@ -170,7 +170,7 @@ macro_rules! separated_pair_sep ( } }); ($i:expr, $separator:path, $f:expr, $($rest:tt)+) => ( - separated_pair_sep!($i, $separator, call!($f), $($rest)*); + separated_pair_sep!($i, $separator, call!($f), $($rest)+); ); ); @@ -508,7 +508,7 @@ macro_rules! alt_sep ( match sep!($i, $separator, $subrule!( $($args)* )) { Ok((i,o)) => Ok((i,$gen(o))), Err(Err::Error(_)) => { - alt_sep!(__impl $i, $separator, $($rest)*) + alt_sep!(__impl $i, $separator, $($rest)+) }, Err(e) => Err(e), }