summary refs log tree commit diff
path: root/src/libsyntax/parse
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2013-05-15 18:16:51 -0700
committerbors <bors@rust-lang.org>2013-05-15 18:16:51 -0700
commit8257528b6c51a1793401cc6028141b86f6432aa6 (patch)
tree39e6fbb833768f5be5c4d6fee6603750caf138af /src/libsyntax/parse
parentc18e44ba17c227522836e4ddfcfc095448d0938c (diff)
parent5dc5efefd47527067ab5b7862d89a99da4824f49 (diff)
downloadrust-8257528b6c51a1793401cc6028141b86f6432aa6.tar.gz
rust-8257528b6c51a1793401cc6028141b86f6432aa6.zip
auto merge of #6502 : huonw/rust/no-auto-code, r=graydon
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute
and remove the majority of the actual auto_* code, leaving stubs to refer the user to
the new syntax.

Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
Diffstat (limited to 'src/libsyntax/parse')
-rw-r--r--src/libsyntax/parse/token.rs12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/libsyntax/parse/token.rs b/src/libsyntax/parse/token.rs
index fe479ab81f7..36f241b6427 100644
--- a/src/libsyntax/parse/token.rs
+++ b/src/libsyntax/parse/token.rs
@@ -18,9 +18,7 @@ use core::cmp::Equiv;
 use core::hashmap::HashSet;
 use core::to_bytes;
 
-#[auto_encode]
-#[auto_decode]
-#[deriving(Eq)]
+#[deriving(Encodable, Decodable, Eq)]
 pub enum binop {
     PLUS,
     MINUS,
@@ -34,9 +32,7 @@ pub enum binop {
     SHR,
 }
 
-#[auto_encode]
-#[auto_decode]
-#[deriving(Eq)]
+#[deriving(Encodable, Decodable, Eq)]
 pub enum Token {
     /* Expression-operator symbols. */
     EQ,
@@ -97,9 +93,7 @@ pub enum Token {
     EOF,
 }
 
-#[auto_encode]
-#[auto_decode]
-#[deriving(Eq)]
+#[deriving(Encodable, Decodable, Eq)]
 /// For interpolation during macro expansion.
 pub enum nonterminal {
     nt_item(@ast::item),