Skip to content

Commit

Permalink
fix previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed Feb 23, 2019
1 parent 34df620 commit 80eb111
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/sequence.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ macro_rules! do_parse (
);

(__impl $i:expr, $field:ident : $submac:ident!( $($args:tt)* ) ) => (
$crate::do_parse!(__impl $i, $submac!( $($args)* ))
do_parse!(__impl $i, $submac!( $($args)* ))
);

(__impl $i:expr, $submac:ident!( $($args:tt)* ) ) => (
Expand All @@ -330,14 +330,14 @@ macro_rules! do_parse (
compile_error!("do_parse uses >> as separator, not ~");
);
(__impl $i:expr, $field:ident : $e:ident ~ $($rest:tt)*) => (
$crate::do_parse!(__impl $i, $field: call!($e) ~ $($rest)*);
do_parse!(__impl $i, $field: call!($e) ~ $($rest)*);
);
(__impl $i:expr, $e:ident ~ $($rest:tt)*) => (
$crate::do_parse!(__impl $i, call!($e) ~ $($rest)*);
do_parse!(__impl $i, call!($e) ~ $($rest)*);
);

(__impl $i:expr, $e:ident >> $($rest:tt)*) => (
$crate::do_parse!(__impl $i, call!($e) >> $($rest)*);
do_parse!(__impl $i, call!($e) >> $($rest)*);
);
(__impl $i:expr, $submac:ident!( $($args:tt)* ) >> $($rest:tt)*) => (
{
Expand All @@ -348,14 +348,14 @@ macro_rules! do_parse (
Err(e) => Err(e),
Ok((i,_)) => {
let i_ = i.clone();
$crate::do_parse!(__impl i_, $($rest)*)
do_parse!(__impl i_, $($rest)*)
},
}
}
);

(__impl $i:expr, $field:ident : $e:ident >> $($rest:tt)*) => (
$crate::do_parse!(__impl $i, $field: call!($e) >> $($rest)*);
do_parse!(__impl $i, $field: call!($e) >> $($rest)*);
);

(__impl $i:expr, $field:ident : $submac:ident!( $($args:tt)* ) >> $($rest:tt)*) => (
Expand All @@ -368,15 +368,15 @@ macro_rules! do_parse (
Ok((i,o)) => {
let $field = o;
let i_ = i.clone();
$crate::do_parse!(__impl i_, $($rest)*)
do_parse!(__impl i_, $($rest)*)
},
}
}
);

// ending the chain
(__impl $i:expr, $e:ident >> ( $($rest:tt)* )) => (
$crate::do_parse!(__impl $i, call!($e) >> ( $($rest)* ));
do_parse!(__impl $i, call!($e) >> ( $($rest)* ));
);

(__impl $i:expr, $submac:ident!( $($args:tt)* ) >> ( $($rest:tt)* )) => ({
Expand All @@ -385,13 +385,13 @@ macro_rules! do_parse (
match $submac!($i, $($args)*) {
Err(e) => Err(e),
Ok((i,_)) => {
$crate::do_parse!(__finalize i, $($rest)*)
do_parse!(__finalize i, $($rest)*)
},
}
});

(__impl $i:expr, $field:ident : $e:ident >> ( $($rest:tt)* )) => (
$crate::do_parse!(__impl $i, $field: call!($e) >> ( $($rest)* ) );
do_parse!(__impl $i, $field: call!($e) >> ( $($rest)* ) );
);

(__impl $i:expr, $field:ident : $submac:ident!( $($args:tt)* ) >> ( $($rest:tt)* )) => ({
Expand All @@ -401,7 +401,7 @@ macro_rules! do_parse (
Err(e) => Err(e),
Ok((i,o)) => {
let $field = o;
$crate::do_parse!(__finalize i, $($rest)*)
do_parse!(__finalize i, $($rest)*)
},
}
});
Expand All @@ -418,7 +418,7 @@ macro_rules! do_parse (

($i:expr, $($rest:tt)*) => (
{
$crate::do_parse!(__impl $i, $($rest)*)
do_parse!(__impl $i, $($rest)*)
}
);
($submac:ident!( $($args:tt)* ) >> $($rest:tt)* ) => (
Expand All @@ -432,7 +432,7 @@ macro_rules! do_parse (
);");
);
($e:ident! >> $($rest:tt)* ) => (
$crate::do_parse!( call!($e) >> $($rest)*);
do_parse!( call!($e) >> $($rest)*);
);
);

Expand Down

0 comments on commit 80eb111

Please sign in to comment.