Skip to content

Commit 55e3cd4

Browse files
committed
Fix utility printers to flush eof in common.rs.
1 parent 1811513 commit 55e3cd4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/comp/util/common.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ fn expr_to_str(&@ast::expr e) -> str {
135135
mutable cur_cmnt=0u,
136136
mode=mo_untyped);
137137
print_expr(out, e);
138+
pretty::pp::eof(out_);
138139
ret s.get_str();
139140
}
140141

@@ -147,6 +148,7 @@ fn ty_to_str(&ty t) -> str {
147148
mutable cur_cmnt=0u,
148149
mode=mo_untyped);
149150
print_type(out, @t);
151+
pretty::pp::eof(out_);
150152
ret s.get_str();
151153
}
152154

@@ -176,6 +178,7 @@ fn block_to_str(&ast::block b) -> str {
176178
mode=mo_untyped);
177179

178180
print_block(out, b);
181+
pretty::pp::eof(out_);
179182
ret s.get_str();
180183
}
181184

@@ -188,6 +191,7 @@ fn item_to_str(&@ast::item i) -> str {
188191
mutable cur_cmnt=0u,
189192
mode=mo_untyped);
190193
print_item(out, i);
194+
pretty::pp::eof(out_);
191195
ret s.get_str();
192196
}
193197

@@ -213,6 +217,7 @@ fn fun_to_str(&ast::_fn f, str name, vec[ast::ty_param] params) -> str {
213217
mode=mo_untyped);
214218

215219
print_fn(out, f.decl, name, params);
220+
pretty::pp::eof(out_);
216221
ret s.get_str();
217222
}
218223

@@ -241,6 +246,7 @@ fn stmt_to_str(&ast::stmt st) -> str {
241246
}
242247
case (_) { /* do nothing */ }
243248
}
249+
pretty::pp::eof(out_);
244250
ret s.get_str();
245251
}
246252

0 commit comments

Comments
 (0)