From e6042a624309bcb1fa87074139c9343e4c556c1b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 8 Oct 2016 22:22:10 -0700 Subject: [PATCH] Update order of macro token parsing --- src/mac.rs | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/src/mac.rs b/src/mac.rs index f06fb71a4c..aa8fc07df2 100644 --- a/src/mac.rs +++ b/src/mac.rs @@ -157,9 +157,21 @@ pub mod parsing { named!(token -> Token, alt!( keyword!("_") => { |_| Token::Underscore } | - punct!("&&") => { |_| Token::AndAnd } // must be before bin_op + punct!("&&") => { |_| Token::AndAnd } // must be before BinOp | - punct!("||") => { |_| Token::OrOr } // must be before bin_op + punct!("||") => { |_| Token::OrOr } // must be before BinOp + | + punct!("->") => { |_| Token::RArrow } // must be before BinOp + | + punct!("<-") => { |_| Token::LArrow } // must be before Lt + | + punct!("=>") => { |_| Token::FatArrow } // must be before Eq + | + punct!("...") => { |_| Token::DotDotDot } // must be before DotDot + | + punct!("..") => { |_| Token::DotDot } // must be before Dot + | + punct!(".") => { |_| Token::Dot } | map!(bin_op_eq, Token::BinOpEq) | @@ -183,18 +195,6 @@ pub mod parsing { | punct!("::") => { |_| Token::ModSep } | - punct!("->") => { |_| Token::RArrow } - | - punct!("<-") => { |_| Token::LArrow } - | - punct!("=>") => { |_| Token::FatArrow } - | - punct!("...") => { |_| Token::DotDotDot } - | - punct!("..") => { |_| Token::DotDot } - | - punct!(".") => { |_| Token::Dot } - | punct!("=") => { |_| Token::Eq } | punct!("<") => { |_| Token::Lt }