about summary refs log tree commit diff
path: root/src/libsyntax/print
diff options
context:
space:
mode:
authorPaul Stansifer <paul.stansifer@gmail.com>2012-08-22 17:24:52 -0700
committerPaul Stansifer <paul.stansifer@gmail.com>2012-08-23 11:14:14 -0700
commit29f32b4a7298b0807408658bc8add1de8a06ab12 (patch)
treec989293754f94ce2c22cee3902af0c57d33e6dd0 /src/libsyntax/print
parent226fd87199fb0184fb39ffc5dff3865cfdc9f362 (diff)
downloadrust-29f32b4a7298b0807408658bc8add1de8a06ab12.tar.gz
rust-29f32b4a7298b0807408658bc8add1de8a06ab12.zip
`m1!{...}` -> `m1!(...)`
Diffstat (limited to 'src/libsyntax/print')
-rw-r--r--src/libsyntax/print/pp.rs74
-rw-r--r--src/libsyntax/print/pprust.rs4
2 files changed, 39 insertions, 39 deletions
diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs
index 7282eaafb79..fbca90b5f49 100644
--- a/src/libsyntax/print/pp.rs
+++ b/src/libsyntax/print/pp.rs
@@ -63,7 +63,7 @@ enum token { STRING(@~str, int), BREAK(break_t), BEGIN(begin_t), END, EOF, }
 
 fn tok_str(++t: token) -> ~str {
     match t {
-      STRING(s, len) => return fmt!{"STR(%s,%d)", *s, len},
+      STRING(s, len) => return fmt!("STR(%s,%d)", *s, len),
       BREAK(_) => return ~"BREAK",
       BEGIN(_) => return ~"BEGIN",
       END => return ~"END",
@@ -81,7 +81,7 @@ fn buf_str(toks: ~[mut token], szs: ~[mut int], left: uint, right: uint,
     while i != right && L != 0u {
         L -= 1u;
         if i != left { s += ~", "; }
-        s += fmt!{"%d=%s", szs[i], tok_str(toks[i])};
+        s += fmt!("%d=%s", szs[i], tok_str(toks[i]));
         i += 1u;
         i %= n;
     }
@@ -99,7 +99,7 @@ fn mk_printer(out: io::Writer, linewidth: uint) -> printer {
     // Yes 3, it makes the ring buffers big enough to never
     // fall behind.
     let n: uint = 3u * linewidth;
-    debug!{"mk_printer %u", linewidth};
+    debug!("mk_printer %u", linewidth);
     let token: ~[mut token] = vec::to_mut(vec::from_elem(n, EOF));
     let size: ~[mut int] = vec::to_mut(vec::from_elem(n, 0));
     let scan_stack: ~[mut uint] = vec::to_mut(vec::from_elem(n, 0u));
@@ -237,7 +237,7 @@ impl printer {
     // be very careful with this!
     fn replace_last_token(t: token) { self.token[self.right] = t; }
     fn pretty_print(t: token) {
-        debug!{"pp ~[%u,%u]", self.left, self.right};
+        debug!("pp ~[%u,%u]", self.left, self.right);
         match t {
           EOF => {
             if !self.scan_stack_empty {
@@ -254,18 +254,18 @@ impl printer {
                 self.left = 0u;
                 self.right = 0u;
             } else { self.advance_right(); }
-            debug!{"pp BEGIN(%d)/buffer ~[%u,%u]",
-                   b.offset, self.left, self.right};
+            debug!("pp BEGIN(%d)/buffer ~[%u,%u]",
+                   b.offset, self.left, self.right);
             self.token[self.right] = t;
             self.size[self.right] = -self.right_total;
             self.scan_push(self.right);
           }
           END => {
             if self.scan_stack_empty {
-                debug!{"pp END/print ~[%u,%u]", self.left, self.right};
+                debug!("pp END/print ~[%u,%u]", self.left, self.right);
                 self.print(t, 0);
             } else {
-                debug!{"pp END/buffer ~[%u,%u]", self.left, self.right};
+                debug!("pp END/buffer ~[%u,%u]", self.left, self.right);
                 self.advance_right();
                 self.token[self.right] = t;
                 self.size[self.right] = -1;
@@ -279,8 +279,8 @@ impl printer {
                 self.left = 0u;
                 self.right = 0u;
             } else { self.advance_right(); }
-            debug!{"pp BREAK(%d)/buffer ~[%u,%u]",
-                   b.offset, self.left, self.right};
+            debug!("pp BREAK(%d)/buffer ~[%u,%u]",
+                   b.offset, self.left, self.right);
             self.check_stack(0);
             self.scan_push(self.right);
             self.token[self.right] = t;
@@ -289,12 +289,12 @@ impl printer {
           }
           STRING(s, len) => {
             if self.scan_stack_empty {
-                debug!{"pp STRING('%s')/print ~[%u,%u]",
-                       *s, self.left, self.right};
+                debug!("pp STRING('%s')/print ~[%u,%u]",
+                       *s, self.left, self.right);
                 self.print(t, len);
             } else {
-                debug!{"pp STRING('%s')/buffer ~[%u,%u]",
-                       *s, self.left, self.right};
+                debug!("pp STRING('%s')/buffer ~[%u,%u]",
+                       *s, self.left, self.right);
                 self.advance_right();
                 self.token[self.right] = t;
                 self.size[self.right] = len;
@@ -305,14 +305,14 @@ impl printer {
         }
     }
     fn check_stream() {
-        debug!{"check_stream ~[%u, %u] with left_total=%d, right_total=%d",
-               self.left, self.right, self.left_total, self.right_total};
+        debug!("check_stream ~[%u, %u] with left_total=%d, right_total=%d",
+               self.left, self.right, self.left_total, self.right_total);
         if self.right_total - self.left_total > self.space {
-            debug!{"scan window is %d, longer than space on line (%d)",
-                   self.right_total - self.left_total, self.space};
+            debug!("scan window is %d, longer than space on line (%d)",
+                   self.right_total - self.left_total, self.space);
             if !self.scan_stack_empty {
                 if self.left == self.scan_stack[self.bottom] {
-                    debug!{"setting %u to infinity and popping", self.left};
+                    debug!("setting %u to infinity and popping", self.left);
                     self.size[self.scan_pop_bottom()] = size_infinity;
                 }
             }
@@ -321,7 +321,7 @@ impl printer {
         }
     }
     fn scan_push(x: uint) {
-        debug!{"scan_push %u", x};
+        debug!("scan_push %u", x);
         if self.scan_stack_empty {
             self.scan_stack_empty = false;
         } else {
@@ -357,8 +357,8 @@ impl printer {
         assert (self.right != self.left);
     }
     fn advance_left(++x: token, L: int) {
-        debug!{"advnce_left ~[%u,%u], sizeof(%u)=%d", self.left, self.right,
-               self.left, L};
+        debug!("advnce_left ~[%u,%u], sizeof(%u)=%d", self.left, self.right,
+               self.left, L);
         if L >= 0 {
             self.print(x, L);
             match x {
@@ -398,13 +398,13 @@ impl printer {
         }
     }
     fn print_newline(amount: int) {
-        debug!{"NEWLINE %d", amount};
+        debug!("NEWLINE %d", amount);
         self.out.write_str(~"\n");
         self.pending_indentation = 0;
         self.indent(amount);
     }
     fn indent(amount: int) {
-        debug!{"INDENT %d", amount};
+        debug!("INDENT %d", amount);
         self.pending_indentation += amount;
     }
     fn get_top() -> print_stack_elt {
@@ -423,24 +423,24 @@ impl printer {
         self.out.write_str(s);
     }
     fn print(x: token, L: int) {
-        debug!{"print %s %d (remaining line space=%d)", tok_str(x), L,
-               self.space};
+        debug!("print %s %d (remaining line space=%d)", tok_str(x), L,
+               self.space);
         log(debug, buf_str(self.token, self.size, self.left, self.right, 6u));
         match x {
           BEGIN(b) => {
             if L > self.space {
                 let col = self.margin - self.space + b.offset;
-                debug!{"print BEGIN -> push broken block at col %d", col};
+                debug!("print BEGIN -> push broken block at col %d", col);
                 self.print_stack.push({offset: col,
                                        pbreak: broken(b.breaks)});
             } else {
-                debug!{"print BEGIN -> push fitting block"};
+                debug!("print BEGIN -> push fitting block");
                 self.print_stack.push({offset: 0,
                                        pbreak: fits});
             }
           }
           END => {
-            debug!{"print END -> pop END"};
+            debug!("print END -> pop END");
             assert (self.print_stack.len() != 0u);
             self.print_stack.pop();
           }
@@ -448,25 +448,25 @@ impl printer {
             let top = self.get_top();
             match top.pbreak {
               fits => {
-                debug!{"print BREAK(%d) in fitting block", b.blank_space};
+                debug!("print BREAK(%d) in fitting block", b.blank_space);
                 self.space -= b.blank_space;
                 self.indent(b.blank_space);
               }
               broken(consistent) => {
-                debug!{"print BREAK(%d+%d) in consistent block",
-                       top.offset, b.offset};
+                debug!("print BREAK(%d+%d) in consistent block",
+                       top.offset, b.offset);
                 self.print_newline(top.offset + b.offset);
                 self.space = self.margin - (top.offset + b.offset);
               }
               broken(inconsistent) => {
                 if L > self.space {
-                    debug!{"print BREAK(%d+%d) w/ newline in inconsistent",
-                           top.offset, b.offset};
+                    debug!("print BREAK(%d+%d) w/ newline in inconsistent",
+                           top.offset, b.offset);
                     self.print_newline(top.offset + b.offset);
                     self.space = self.margin - (top.offset + b.offset);
                 } else {
-                    debug!{"print BREAK(%d) w/o newline in inconsistent",
-                           b.blank_space};
+                    debug!("print BREAK(%d) w/o newline in inconsistent",
+                           b.blank_space);
                     self.indent(b.blank_space);
                     self.space -= b.blank_space;
                 }
@@ -474,7 +474,7 @@ impl printer {
             }
           }
           STRING(s, len) => {
-            debug!{"print STRING(%s)", *s};
+            debug!("print STRING(%s)", *s);
             assert (L == len);
             // assert L <= space;
             self.space -= len;
diff --git a/src/libsyntax/print/pprust.rs b/src/libsyntax/print/pprust.rs
index 04f800a7238..8320d438b4e 100644
--- a/src/libsyntax/print/pprust.rs
+++ b/src/libsyntax/print/pprust.rs
@@ -937,14 +937,14 @@ fn print_mac(s: ps, m: ast::mac) {
         bclose(s, m.span);
       }
       ast::mac_ellipsis => word(s.s, ~"..."),
-      ast::mac_var(v) => word(s.s, fmt!{"$%u", v}),
+      ast::mac_var(v) => word(s.s, fmt!("$%u", v)),
       _ => { /* fixme */ }
     }
 }
 
 fn print_vstore(s: ps, t: ast::vstore) {
     match t {
-      ast::vstore_fixed(some(i)) => word(s.s, fmt!{"%u", i}),
+      ast::vstore_fixed(some(i)) => word(s.s, fmt!("%u", i)),
       ast::vstore_fixed(none) => word(s.s, ~"_"),
       ast::vstore_uniq => word(s.s, ~"~"),
       ast::vstore_box => word(s.s, ~"@"),