libsyntax: Implement deriving via a syntax extension for the IterBytes trait. r=brson

This commit is contained in:
Patrick Walton 2012-11-20 18:27:13 -08:00
parent b053f0b5e6
commit 57588edf3b
5 changed files with 442 additions and 123 deletions

View file

@ -0,0 +1,16 @@
#[deriving_iter_bytes]
enum Foo {
Bar(int, char),
Baz(char, int)
}
#[deriving_iter_bytes]
enum A {
B,
C,
D,
E
}
fn main(){}

View file

@ -0,0 +1,10 @@
#[deriving_iter_bytes]
struct Foo {
x: int,
y: int,
z: int
}
fn main() {}