Skip to content

Commit

Permalink
Update order of macro token parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 9, 2016
1 parent f7922e3 commit e6042a6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/mac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
|
Expand All @@ -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 }
Expand Down

0 comments on commit e6042a6

Please sign in to comment.