diff options
| author | Marijn Haverbeke <marijnh@gmail.com> | 2011-12-20 16:33:55 +0100 |
|---|---|---|
| committer | Marijn Haverbeke <marijnh@gmail.com> | 2011-12-23 18:09:25 +0100 |
| commit | 057617c6654bfd5a677112cd26141d0b9c137145 (patch) | |
| tree | 316c1b2cbcb11aa3cd02f05107e76fa5cd624fef /src/rt/rust_obstack.cpp | |
| parent | 92927449595782926c4db5a579ba7e4c6952287d (diff) | |
| download | rust-057617c6654bfd5a677112cd26141d0b9c137145.tar.gz rust-057617c6654bfd5a677112cd26141d0b9c137145.zip | |
Parse `iface` items and interface references in `impl` items.
The (temporary) syntax is
iface seq<T> {
fn len() -> uint;
fn iter(f: block(T));
}
// The 'blah<T>' can be left of to default the name of the
// impl to seq<T>. The 'of seq<T>' can be left off when
// not implementing a named interface.
impl blah<T> of seq<T> for [T] {
fn len() -> uint { vec::len(self) }
fn iter(f: block(T)) { for x in self { f(x); } }
}
Diffstat (limited to 'src/rt/rust_obstack.cpp')
0 files changed, 0 insertions, 0 deletions
