Skip to content

Commit bd62de1

Browse files
committed
---
yaml --- r: 2857 b: refs/heads/master c: 1811513 h: refs/heads/master i: 2855: 0739a97 v: v3
1 parent 4a7b2f7 commit bd62de1

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 371c25683c60fd674368a7a82dfb64e6170b6805
2+
refs/heads/master: 18115135529b9c7dd36286c9a8b6899dbb04aeeb

trunk/src/comp/pretty/pp.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -443,13 +443,15 @@ obj printer(io::writer out,
443443
}
444444

445445
fn print(token x, int L) {
446-
log #fmt("print %s %d (remaining line space=%d)", tok_str(x), L, space);
446+
log #fmt("print %s %d (remaining line space=%d)",
447+
tok_str(x), L, space);
447448
log buf_str(token, size, left, right, 6u);
448449
alt (x) {
449450
case (BEGIN(?b)) {
450451
if (L > space) {
451452
auto col = (margin - space) + b.offset;
452-
log #fmt("print BEGIN -> push broken block at col %d", col);
453+
log #fmt("print BEGIN -> push broken block at col %d",
454+
col);
453455
vec::push(print_stack,
454456
rec(offset = col,
455457
pbreak = broken(b.breaks)));
@@ -491,11 +493,11 @@ obj printer(io::writer out,
491493

492494
case (broken(inconsistent)) {
493495
if (L > space) {
494-
log "print BREAK w/ newline in inconsistent block";
496+
log "print BREAK w/ newline in inconsistent";
495497
self.print_newline(top.offset + b.offset);
496498
space = margin - (top.offset + b.offset);
497499
} else {
498-
log "print BREAK w/o newline in inconsistent block";
500+
log "print BREAK w/o newline in inconsistent";
499501
self.indent(b.blank_space);
500502
space -= b.blank_space;
501503
}

trunk/src/comp/pretty/pprust.rs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,11 @@ fn block_to_str(&ast::block blk) -> str {
7272
comments=option::none[vec[lexer::cmnt]],
7373
mutable cur_cmnt=0u,
7474
mode=mo_untyped);
75-
cbox(s.s, indent_unit); // containing cbox, will be closed by print-block at }
76-
ibox(s.s, 0u); // head-ibox, will be closed by print-block after {
75+
// containing cbox, will be closed by print-block at }
76+
cbox(s.s, indent_unit);
77+
78+
// head-ibox, will be closed by print-block after {
79+
ibox(s.s, 0u);
7780
print_block(s, blk);
7881
eof(s.s);
7982
ret writer.get_str();
@@ -657,8 +660,11 @@ fn print_expr(ps s, &@ast::expr expr) {
657660
bclose(s, expr.span);
658661
}
659662
case (ast::expr_block(?block,_)) {
660-
cbox(s.s, indent_unit); // containing cbox, will be closed by print-block at }
661-
ibox(s.s, 0u); // head-box, will be closed by print-block after {
663+
// containing cbox, will be closed by print-block at }
664+
cbox(s.s, indent_unit);
665+
666+
// head-box, will be closed by print-block after {
667+
ibox(s.s, 0u);
662668
print_block(s, block);
663669
}
664670
case (ast::expr_assign(?lhs,?rhs,_)) {

0 commit comments

Comments
 (0)