diff options
| author | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-02-08 13:16:12 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2016-02-11 12:34:48 +0100 |
| commit | 05e25de4f0add7ae3cd0e8f66cd4558c5bfa42aa (patch) | |
| tree | 587130bb0d9d974e579d5a92a4893412351069fe /src/libsyntax/parse/token.rs | |
| parent | f875f4c4c24e8a14c04bbe4eedd230c4aa3c1431 (diff) | |
| download | rust-05e25de4f0add7ae3cd0e8f66cd4558c5bfa42aa.tar.gz rust-05e25de4f0add7ae3cd0e8f66cd4558c5bfa42aa.zip | |
[breaking-change] don't glob export ast::BinOp_
Diffstat (limited to 'src/libsyntax/parse/token.rs')
| -rw-r--r-- | src/libsyntax/parse/token.rs | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs index 220d0aff2e3..7d1b78b632f 100644 --- a/src/libsyntax/parse/token.rs +++ b/src/libsyntax/parse/token.rs @@ -15,7 +15,7 @@ pub use self::IdentStyle::*; pub use self::Lit::*; pub use self::Token::*; -use ast; +use ast::{self, BinOpKind}; use ext::mtwt; use ptr::P; use util::interner::{RcStr, StrInterner}; @@ -264,26 +264,26 @@ impl Token { } /// Maps a token to its corresponding binary operator. - pub fn to_binop(&self) -> Option<ast::BinOp_> { + pub fn to_binop(&self) -> Option<BinOpKind> { match *self { - BinOp(Star) => Some(ast::BiMul), - BinOp(Slash) => Some(ast::BiDiv), - BinOp(Percent) => Some(ast::BiRem), - BinOp(Plus) => Some(ast::BiAdd), - BinOp(Minus) => Some(ast::BiSub), - BinOp(Shl) => Some(ast::BiShl), - BinOp(Shr) => Some(ast::BiShr), - BinOp(And) => Some(ast::BiBitAnd), - BinOp(Caret) => Some(ast::BiBitXor), - BinOp(Or) => Some(ast::BiBitOr), - Lt => Some(ast::BiLt), - Le => Some(ast::BiLe), - Ge => Some(ast::BiGe), - Gt => Some(ast::BiGt), - EqEq => Some(ast::BiEq), - Ne => Some(ast::BiNe), - AndAnd => Some(ast::BiAnd), - OrOr => Some(ast::BiOr), + BinOp(Star) => Some(BinOpKind::Mul), + BinOp(Slash) => Some(BinOpKind::Div), + BinOp(Percent) => Some(BinOpKind::Rem), + BinOp(Plus) => Some(BinOpKind::Add), + BinOp(Minus) => Some(BinOpKind::Sub), + BinOp(Shl) => Some(BinOpKind::Shl), + BinOp(Shr) => Some(BinOpKind::Shr), + BinOp(And) => Some(BinOpKind::BitAnd), + BinOp(Caret) => Some(BinOpKind::BitXor), + BinOp(Or) => Some(BinOpKind::BitOr), + Lt => Some(BinOpKind::Lt), + Le => Some(BinOpKind::Le), + Ge => Some(BinOpKind::Ge), + Gt => Some(BinOpKind::Gt), + EqEq => Some(BinOpKind::Eq), + Ne => Some(BinOpKind::Ne), + AndAnd => Some(BinOpKind::And), + OrOr => Some(BinOpKind::Or), _ => None, } } |
