Change syntax for impl

Move the name of the bundle to the front, allow type parameters (not
handled yet), and add a 'for' keyword:

    impl utils for int {
        fn str() -> str { int::str(self) }
        fn times(f: block()) { ... }
    }
This commit is contained in:
Marijn Haverbeke 2011-12-16 10:42:28 +01:00
parent 4f826d81f6
commit cff6bdd036
6 changed files with 34 additions and 20 deletions

View file

@ -505,7 +505,7 @@ tag item_ {
node_id /* dtor id */,
[ty_param],
node_id /* ctor id */);
item_impl(@path /* iface */, @ty /* self */, [@method]);
item_impl([ty_param], @ty /* self */, [@method]);
}
type native_item =