We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2490cd3 commit d631f29Copy full SHA for d631f29
src/comp/pretty/pprust.rs
@@ -32,6 +32,24 @@ fn ty_to_str(&@ast.ty ty) -> str {
32
ret writer.get_str();
33
}
34
35
+fn block_to_str(&ast.block blk) -> str {
36
+ auto writer = io.string_writer();
37
+ auto s = @rec(s=pp.mkstate(writer.get_writer(), 78u),
38
+ comments=option.none[vec[lexer.cmnt]],
39
+ mutable cur_cmnt=0u);
40
+ print_block(s, blk);
41
+ ret writer.get_str();
42
+}
43
+
44
+fn expr_to_str(&@ast.expr e) -> str {
45
46
47
48
49
+ print_expr(s, e);
50
51
52
53
impure fn hbox(ps s) {
54
pp.hbox(s.s, indent_unit);
55
0 commit comments