about summary refs log tree commit diff
path: root/src/libsyntax/parse/token.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-11-28 12:38:53 -0800
committerBrian Anderson <banderson@mozilla.com>2012-11-28 13:17:33 -0800
commitfc06114ddfd2bcdbc4f29076c226a7a1d66ea8d6 (patch)
treebd9de2c450f23b8ff0e09130ab59d784ace5b5e3 /src/libsyntax/parse/token.rs
parent669fbddc4435a9ab152332df06a7fcca789c8059 (diff)
parent8179e268efd86ae5c1bcf21b4f8d4e01eea7c193 (diff)
downloadrust-fc06114ddfd2bcdbc4f29076c226a7a1d66ea8d6.tar.gz
rust-fc06114ddfd2bcdbc4f29076c226a7a1d66ea8d6.zip
Merge remote-tracking branch 'brson/companion' into incoming
Conflicts:
	src/compiletest/compiletest.rs
	src/libcargo/cargo.rs
	src/libcore/core.rs
	src/librustc/rustc.rs
	src/librustdoc/rustdoc.rc
Diffstat (limited to 'src/libsyntax/parse/token.rs')
-rw-r--r--src/libsyntax/parse/token.rs285
1 files changed, 0 insertions, 285 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index 7b15f00d761..99c12be4980 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -465,294 +465,13 @@ fn reserved_keyword_table() -> HashMap<~str, ()> {
 }
 
 impl binop : cmp::Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &binop) -> bool {
-        (self as uint) == ((*other) as uint)
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &binop) -> bool {
         ((*self) as uint) == ((*other) as uint)
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &binop) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &binop) -> bool { !(*self).eq(other) }
 }
 
 impl Token : cmp::Eq {
-    #[cfg(stage0)]
-    pure fn eq(other: &Token) -> bool {
-        match self {
-            EQ => {
-                match (*other) {
-                    EQ => true,
-                    _ => false
-                }
-            }
-            LT => {
-                match (*other) {
-                    LT => true,
-                    _ => false
-                }
-            }
-            LE => {
-                match (*other) {
-                    LE => true,
-                    _ => false
-                }
-            }
-            EQEQ => {
-                match (*other) {
-                    EQEQ => true,
-                    _ => false
-                }
-            }
-            NE => {
-                match (*other) {
-                    NE => true,
-                    _ => false
-                }
-            }
-            GE => {
-                match (*other) {
-                    GE => true,
-                    _ => false
-                }
-            }
-            GT => {
-                match (*other) {
-                    GT => true,
-                    _ => false
-                }
-            }
-            ANDAND => {
-                match (*other) {
-                    ANDAND => true,
-                    _ => false
-                }
-            }
-            OROR => {
-                match (*other) {
-                    OROR => true,
-                    _ => false
-                }
-            }
-            NOT => {
-                match (*other) {
-                    NOT => true,
-                    _ => false
-                }
-            }
-            TILDE => {
-                match (*other) {
-                    TILDE => true,
-                    _ => false
-                }
-            }
-            BINOP(e0a) => {
-                match (*other) {
-                    BINOP(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            BINOPEQ(e0a) => {
-                match (*other) {
-                    BINOPEQ(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            AT => {
-                match (*other) {
-                    AT => true,
-                    _ => false
-                }
-            }
-            DOT => {
-                match (*other) {
-                    DOT => true,
-                    _ => false
-                }
-            }
-            DOTDOT => {
-                match (*other) {
-                    DOTDOT => true,
-                    _ => false
-                }
-            }
-            ELLIPSIS => {
-                match (*other) {
-                    ELLIPSIS => true,
-                    _ => false
-                }
-            }
-            COMMA => {
-                match (*other) {
-                    COMMA => true,
-                    _ => false
-                }
-            }
-            SEMI => {
-                match (*other) {
-                    SEMI => true,
-                    _ => false
-                }
-            }
-            COLON => {
-                match (*other) {
-                    COLON => true,
-                    _ => false
-                }
-            }
-            MOD_SEP => {
-                match (*other) {
-                    MOD_SEP => true,
-                    _ => false
-                }
-            }
-            RARROW => {
-                match (*other) {
-                    RARROW => true,
-                    _ => false
-                }
-            }
-            LARROW => {
-                match (*other) {
-                    LARROW => true,
-                    _ => false
-                }
-            }
-            DARROW => {
-                match (*other) {
-                    DARROW => true,
-                    _ => false
-                }
-            }
-            FAT_ARROW => {
-                match (*other) {
-                    FAT_ARROW => true,
-                    _ => false
-                }
-            }
-            LPAREN => {
-                match (*other) {
-                    LPAREN => true,
-                    _ => false
-                }
-            }
-            RPAREN => {
-                match (*other) {
-                    RPAREN => true,
-                    _ => false
-                }
-            }
-            LBRACKET => {
-                match (*other) {
-                    LBRACKET => true,
-                    _ => false
-                }
-            }
-            RBRACKET => {
-                match (*other) {
-                    RBRACKET => true,
-                    _ => false
-                }
-            }
-            LBRACE => {
-                match (*other) {
-                    LBRACE => true,
-                    _ => false
-                }
-            }
-            RBRACE => {
-                match (*other) {
-                    RBRACE => true,
-                    _ => false
-                }
-            }
-            POUND => {
-                match (*other) {
-                    POUND => true,
-                    _ => false
-                }
-            }
-            DOLLAR => {
-                match (*other) {
-                    DOLLAR => true,
-                    _ => false
-                }
-            }
-            LIT_INT(e0a, e1a) => {
-                match (*other) {
-                    LIT_INT(e0b, e1b) => e0a == e0b && e1a == e1b,
-                    _ => false
-                }
-            }
-            LIT_UINT(e0a, e1a) => {
-                match (*other) {
-                    LIT_UINT(e0b, e1b) => e0a == e0b && e1a == e1b,
-                    _ => false
-                }
-            }
-            LIT_INT_UNSUFFIXED(e0a) => {
-                match (*other) {
-                    LIT_INT_UNSUFFIXED(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            LIT_FLOAT(e0a, e1a) => {
-                match (*other) {
-                    LIT_FLOAT(e0b, e1b) => e0a == e0b && e1a == e1b,
-                    _ => false
-                }
-            }
-            LIT_FLOAT_UNSUFFIXED(e0a) => {
-                match (*other) {
-                    LIT_FLOAT_UNSUFFIXED(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            LIT_STR(e0a) => {
-                match (*other) {
-                    LIT_STR(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            IDENT(e0a, e1a) => {
-                match (*other) {
-                    IDENT(e0b, e1b) => e0a == e0b && e1a == e1b,
-                    _ => false
-                }
-            }
-            UNDERSCORE => {
-                match (*other) {
-                    UNDERSCORE => true,
-                    _ => false
-                }
-            }
-            INTERPOLATED(_) => {
-                match (*other) {
-                    INTERPOLATED(_) => true,
-                    _ => false
-                }
-            }
-            DOC_COMMENT(e0a) => {
-                match (*other) {
-                    DOC_COMMENT(e0b) => e0a == e0b,
-                    _ => false
-                }
-            }
-            EOF => {
-                match (*other) {
-                    EOF => true,
-                    _ => false
-                }
-            }
-        }
-    }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn eq(&self, other: &Token) -> bool {
         match (*self) {
             EQ => {
@@ -1021,10 +740,6 @@ impl Token : cmp::Eq {
             }
         }
     }
-    #[cfg(stage0)]
-    pure fn ne(other: &Token) -> bool { !self.eq(other) }
-    #[cfg(stage1)]
-    #[cfg(stage2)]
     pure fn ne(&self, other: &Token) -> bool { !(*self).eq(other) }
 }