提交 371c2568 编写于 作者: G Graydon Hoare

Break methods in obj types.

上级 1676c674
...@@ -235,6 +235,7 @@ fn get_span(&ast::ty_field f) -> common::span { ...@@ -235,6 +235,7 @@ fn get_span(&ast::ty_field f) -> common::span {
head(s, "obj"); head(s, "obj");
bopen(s); bopen(s);
for (ast::ty_method m in methods) { for (ast::ty_method m in methods) {
hardbreak(s.s);
cbox(s.s, indent_unit); cbox(s.s, indent_unit);
print_ty_fn(s, m.proto, option::some[str](m.ident), print_ty_fn(s, m.proto, option::some[str](m.ident),
m.inputs, m.output, m.cf); m.inputs, m.output, m.cf);
...@@ -1045,6 +1046,7 @@ fn print_string(ps s, str st) { ...@@ -1045,6 +1046,7 @@ fn print_string(ps s, str st) {
fn print_ty_fn(ps s, ast::proto proto, option::t[str] id, fn print_ty_fn(ps s, ast::proto proto, option::t[str] id,
vec[ast::ty_arg] inputs, @ast::ty output, vec[ast::ty_arg] inputs, @ast::ty output,
ast::controlflow cf) { ast::controlflow cf) {
ibox(s.s, indent_unit);
if (proto == ast::proto_fn) {word(s.s, "fn");} if (proto == ast::proto_fn) {word(s.s, "fn");}
else {word(s.s, "iter");} else {word(s.s, "iter");}
alt (id) { alt (id) {
...@@ -1074,6 +1076,7 @@ fn print_arg(ps s, &ast::ty_arg input) { ...@@ -1074,6 +1076,7 @@ fn print_arg(ps s, &ast::ty_arg input) {
} }
end(s.s); end(s.s);
} }
end(s.s);
} }
fn next_comment(ps s) -> option::t[lexer::cmnt] { fn next_comment(ps s) -> option::t[lexer::cmnt] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册