rustc: Parse, serialize, and deserialize trait inheritance

This commit is contained in:
Patrick Walton
2012-08-03 15:02:01 -07:00
parent a805a1fb37
commit b65dd9d090
13 changed files with 69 additions and 21 deletions

View File

@@ -590,10 +590,15 @@ fn print_item(s: ps, &&item: @ast::item) {
}
bclose(s, item.span);
}
ast::item_trait(tps, methods) {
ast::item_trait(tps, traits, methods) {
head(s, ~"trait");
word(s.s, *item.ident);
print_type_params(s, tps);
if vec::len(traits) != 0u {
word_space(s, ~":");
commasep(s, inconsistent, traits, |s, p|
print_path(s, p.path, false));
}
word(s.s, ~" ");
bopen(s);
for methods.each |meth| { print_trait_method(s, meth); }