about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorGraydon Hoare <graydon@mozilla.com>2011-05-31 09:54:18 -0700
committerGraydon Hoare <graydon@mozilla.com>2011-05-31 11:00:47 -0700
commit18115135529b9c7dd36286c9a8b6899dbb04aeeb (patch)
tree7ea6389b5fe4de7bd1cb987f1b47d88d52eef51c /src
parent371c25683c60fd674368a7a82dfb64e6170b6805 (diff)
Fix long lines
Diffstat (limited to 'src')
-rw-r--r--src/comp/pretty/pp.rs10
-rw-r--r--src/comp/pretty/pprust.rs14
2 files changed, 16 insertions, 8 deletions
diff --git a/src/comp/pretty/pp.rs b/src/comp/pretty/pp.rs
index 7f0004b1874..1933688c912 100644
--- a/src/comp/pretty/pp.rs
+++ b/src/comp/pretty/pp.rs
@@ -443,13 +443,15 @@ obj printer(io::writer out,
     }
 
     fn print(token x, int L) {
-        log #fmt("print %s %d (remaining line space=%d)", tok_str(x), L, space);
+        log #fmt("print %s %d (remaining line space=%d)",
+                 tok_str(x), L, space);
         log buf_str(token, size, left, right, 6u);
         alt (x) {
             case (BEGIN(?b)) {
                 if (L > space) {
                     auto col = (margin - space) + b.offset;
-                    log #fmt("print BEGIN -> push broken block at col %d", col);
+                    log #fmt("print BEGIN -> push broken block at col %d",
+                             col);
                     vec::push(print_stack,
                               rec(offset = col,
                                   pbreak = broken(b.breaks)));
@@ -491,11 +493,11 @@ obj printer(io::writer out,
 
                     case (broken(inconsistent)) {
                         if (L > space) {
-                            log "print BREAK w/ newline in inconsistent block";
+                            log "print BREAK w/ newline in inconsistent";
                             self.print_newline(top.offset + b.offset);
                             space = margin - (top.offset + b.offset);
                         } else {
-                            log "print BREAK w/o newline in inconsistent block";
+                            log "print BREAK w/o newline in inconsistent";
                             self.indent(b.blank_space);
                             space -= b.blank_space;
                         }
diff --git a/src/comp/pretty/pprust.rs b/src/comp/pretty/pprust.rs
index a3592b094cb..10940c29661 100644
--- a/src/comp/pretty/pprust.rs
+++ b/src/comp/pretty/pprust.rs
@@ -72,8 +72,11 @@ fn block_to_str(&ast::block blk) -> str {
                   comments=option::none[vec[lexer::cmnt]],
                   mutable cur_cmnt=0u,
                   mode=mo_untyped);
-    cbox(s.s, indent_unit); // containing cbox, will be closed by print-block at }
-    ibox(s.s, 0u); // head-ibox, will be closed by print-block after {
+    // containing cbox, will be closed by print-block at }
+    cbox(s.s, indent_unit);
+
+    // head-ibox, will be closed by print-block after {
+    ibox(s.s, 0u);
     print_block(s, blk);
     eof(s.s);
     ret writer.get_str();
@@ -657,8 +660,11 @@ fn print_expr(ps s, &@ast::expr expr) {
             bclose(s, expr.span);
         }
         case (ast::expr_block(?block,_)) {
-            cbox(s.s, indent_unit); // containing cbox, will be closed by print-block at }
-            ibox(s.s, 0u); // head-box, will be closed by print-block after {
+            // containing cbox, will be closed by print-block at }
+            cbox(s.s, indent_unit);
+
+            // head-box, will be closed by print-block after {
+            ibox(s.s, 0u);
             print_block(s, block);
         }
         case (ast::expr_assign(?lhs,?rhs,_)) {