about summary refs log tree commit diff
path: root/src/libsyntax/ext/pipes
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/ext/pipes
parent226fd87199fb0184fb39ffc5dff3865cfdc9f362 (diff)
downloadrust-29f32b4a7298b0807408658bc8add1de8a06ab12.tar.gz
rust-29f32b4a7298b0807408658bc8add1de8a06ab12.zip
`m1!{...}` -> `m1!(...)`
Diffstat (limited to 'src/libsyntax/ext/pipes')
-rw-r--r--src/libsyntax/ext/pipes/check.rs12
-rw-r--r--src/libsyntax/ext/pipes/liveness.rs16
-rw-r--r--src/libsyntax/ext/pipes/pipec.rs38
-rw-r--r--src/libsyntax/ext/pipes/proto.rs4
4 files changed, 35 insertions, 35 deletions
diff --git a/src/libsyntax/ext/pipes/check.rs b/src/libsyntax/ext/pipes/check.rs
index b7ad5c21bd9..60d1d666a7f 100644
--- a/src/libsyntax/ext/pipes/check.rs
+++ b/src/libsyntax/ext/pipes/check.rs
@@ -32,9 +32,9 @@ impl ext_ctxt: proto::visitor<(), (), ()>  {
         if state.messages.len() == 0 {
             self.span_warn(
                 state.span, // use a real span!
-                fmt!{"state %s contains no messages, \
+                fmt!("state %s contains no messages, \
                       consider stepping to a terminal state instead",
-                      state.name})
+                      state.name))
         }
     }
 
@@ -48,8 +48,8 @@ impl ext_ctxt: proto::visitor<(), (), ()>  {
                 // track span information.
                 self.span_err(
                     proto.get_state(next).span,
-                    fmt!{"message %s steps to undefined state, %s",
-                         name, next});
+                    fmt!("message %s steps to undefined state, %s",
+                         name, next));
             }
             else {
                 let next = proto.get_state(next);
@@ -57,11 +57,11 @@ impl ext_ctxt: proto::visitor<(), (), ()>  {
                 if next.ty_params.len() != next_tys.len() {
                     self.span_err(
                         next.span, // use a real span
-                        fmt!{"message %s target (%s) \
+                        fmt!("message %s target (%s) \
                               needs %u type parameters, but got %u",
                              name, next.name,
                              next.ty_params.len(),
-                             next_tys.len()});
+                             next_tys.len()));
                 }
             }
           }
diff --git a/src/libsyntax/ext/pipes/liveness.rs b/src/libsyntax/ext/pipes/liveness.rs
index 2325e4ed27d..a3dfdb6a769 100644
--- a/src/libsyntax/ext/pipes/liveness.rs
+++ b/src/libsyntax/ext/pipes/liveness.rs
@@ -32,7 +32,7 @@ import std::bitv::{bitv};
 import ast_builder::empty_span;
 
 fn analyze(proto: protocol, _cx: ext_ctxt) {
-    debug!{"initializing colive analysis"};
+    debug!("initializing colive analysis");
     let num_states = proto.num_states();
     let colive = do (copy proto.states).map_to_vec |state| {
         let bv = ~bitv(num_states, false);
@@ -46,7 +46,7 @@ fn analyze(proto: protocol, _cx: ext_ctxt) {
     let mut changed = true;
     while changed {
         changed = false;
-        debug!{"colive iteration %?", i};
+        debug!("colive iteration %?", i);
         for colive.eachi |i, this_colive| {
             let this = proto.get_state_by_id(i);
             for this_colive.ones |j| {
@@ -59,7 +59,7 @@ fn analyze(proto: protocol, _cx: ext_ctxt) {
         i += 1;
     }
 
-    debug!{"colive analysis complete"};
+    debug!("colive analysis complete");
 
     // Determine if we're bounded
     let mut self_live = ~[];
@@ -72,20 +72,20 @@ fn analyze(proto: protocol, _cx: ext_ctxt) {
     if self_live.len() > 0 {
         let states = str::connect(self_live.map(|s| s.name), ~" ");
 
-        debug!{"protocol %s is unbounded due to loops involving: %s",
-               proto.name, states};
+        debug!("protocol %s is unbounded due to loops involving: %s",
+               proto.name, states);
 
         // Someday this will be configurable with a warning
         //cx.span_warn(empty_span(),
-        //              fmt!{"protocol %s is unbounded due to loops \
+        //              fmt!("protocol %s is unbounded due to loops \
         //                    involving these states: %s",
         //                   *proto.name,
-        //                   states});
+        //                   states));
 
         proto.bounded = some(false);
     }
     else {
-        debug!{"protocol %s is bounded. yay!", proto.name};
+        debug!("protocol %s is bounded. yay!", proto.name);
         proto.bounded = some(true);
     }
 }
\ No newline at end of file
diff --git a/src/libsyntax/ext/pipes/pipec.rs b/src/libsyntax/ext/pipes/pipec.rs
index b5a1ae588a7..315d02eadd3 100644
--- a/src/libsyntax/ext/pipes/pipec.rs
+++ b/src/libsyntax/ext/pipes/pipec.rs
@@ -39,7 +39,7 @@ trait gen_init {
 
 impl message: gen_send {
     fn gen_send(cx: ext_ctxt, try: bool) -> @ast::item {
-        debug!{"pipec: gen_send"};
+        debug!("pipec: gen_send");
         match self {
           message(id, span, tys, this,
                   some({state: next, tys: next_tys})) => {
@@ -75,9 +75,9 @@ impl message: gen_send {
                 body += fmt!("let %s = pipes::send_packet_buffered(\
                               ptr::addr_of(b.buffer.data.%s));\n",
                              sp, next.name);
-                body += fmt!{"let %s = pipes::recv_packet_buffered(\
+                body += fmt!("let %s = pipes::recv_packet_buffered(\
                               ptr::addr_of(b.buffer.data.%s));\n",
-                             rp, next.name};
+                             rp, next.name);
             }
             else {
                 let pat = match (this.dir, next.dir) {
@@ -97,7 +97,7 @@ impl message: gen_send {
                                       ~", "));
 
             if !try {
-                body += fmt!{"pipes::send(pipe, message);\n"};
+                body += fmt!("pipes::send(pipe, message);\n");
                 // return the new channel
                 body += ~"c }";
             }
@@ -127,7 +127,7 @@ impl message: gen_send {
           }
 
             message(id, span, tys, this, none) => {
-                debug!{"pipec: no next state"};
+                debug!("pipec: no next state");
                 let arg_names = tys.mapi(|i, _ty| (~"x_" + i.to_str()));
 
                 let args_ast = (arg_names, tys).map(
@@ -150,13 +150,13 @@ impl message: gen_send {
                 };
 
                 let mut body = ~"{ ";
-                body += fmt!{"let message = %s::%s%s;\n",
+                body += fmt!("let message = %s::%s%s;\n",
                              this.proto.name,
                              self.name(),
-                             message_args};
+                             message_args);
 
                 if !try {
-                    body += fmt!{"pipes::send(pipe, message);\n"};
+                    body += fmt!("pipes::send(pipe, message);\n");
                     body += ~" }";
                 } else {
                     body += fmt!("if pipes::send(pipe, message) { \
@@ -192,7 +192,7 @@ impl message: gen_send {
 
 impl state: to_type_decls {
     fn to_type_decls(cx: ext_ctxt) -> ~[@ast::item] {
-        debug!{"pipec: to_type_decls"};
+        debug!("pipec: to_type_decls");
         // This compiles into two different type declarations. Say the
         // state is called ping. This will generate both `ping` and
         // `ping_message`. The first contains data that the user cares
@@ -238,7 +238,7 @@ impl state: to_type_decls {
     }
 
     fn to_endpoint_decls(cx: ext_ctxt, dir: direction) -> ~[@ast::item] {
-        debug!{"pipec: to_endpoint_decls"};
+        debug!("pipec: to_endpoint_decls");
         let dir = match dir {
           send => (*self).dir,
           recv => (*self).dir.reverse()
@@ -293,7 +293,7 @@ impl protocol: gen_init {
     fn gen_init(cx: ext_ctxt) -> @ast::item {
         let ext_cx = cx;
 
-        debug!{"gen_init"};
+        debug!("gen_init");
         let start_state = self.states[0];
 
         let body = if !self.is_bounded() {
@@ -320,12 +320,12 @@ impl protocol: gen_init {
             }
         };
 
-        cx.parse_item(fmt!{"fn init%s() -> (client::%s, server::%s)\
+        cx.parse_item(fmt!("fn init%s() -> (client::%s, server::%s)\
                             { import pipes::has_buffer; %s }",
                            start_state.ty_params.to_source(cx),
                            start_state.to_ty(cx).to_source(cx),
                            start_state.to_ty(cx).to_source(cx),
-                           body.to_source(cx)})
+                           body.to_source(cx)))
     }
 
     fn gen_buffer_init(ext_cx: ext_ctxt) -> @ast::expr {
@@ -337,7 +337,7 @@ impl protocol: gen_init {
     }
 
     fn gen_init_bounded(ext_cx: ext_ctxt) -> @ast::expr {
-        debug!{"gen_init_bounded"};
+        debug!("gen_init_bounded");
         let buffer_fields = self.gen_buffer_init(ext_cx);
 
         let buffer = #ast {
@@ -349,11 +349,11 @@ impl protocol: gen_init {
             ext_cx.block(
                 self.states.map_to_vec(
                     |s| ext_cx.parse_stmt(
-                        fmt!{"data.%s.set_buffer(buffer)",
-                             s.name})),
+                        fmt!("data.%s.set_buffer(buffer)",
+                             s.name))),
                 ext_cx.parse_expr(
-                    fmt!{"ptr::addr_of(data.%s)",
-                         self.states[0].name})));
+                    fmt!("ptr::addr_of(data.%s)",
+                         self.states[0].name))));
 
         #ast {{
             let buffer = $(buffer);
@@ -490,7 +490,7 @@ impl ext_ctxt: ext_ctxt_parse_utils {
         match res {
           some(ast) => ast,
           none => {
-            error!{"Parse error with ```\n%s\n```", s};
+            error!("Parse error with ```\n%s\n```", s);
             fail
           }
         }
diff --git a/src/libsyntax/ext/pipes/proto.rs b/src/libsyntax/ext/pipes/proto.rs
index 62c5329525f..eea4e434956 100644
--- a/src/libsyntax/ext/pipes/proto.rs
+++ b/src/libsyntax/ext/pipes/proto.rs
@@ -152,9 +152,9 @@ struct protocol_ {
         let bounded = self.bounded.get();
         bounded
         //if bounded && self.has_ty_params() {
-        //    debug!{"protocol %s has is bounded, but type parameters\
+        //    debug!("protocol %s has is bounded, but type parameters\
         //            are not yet supported.",
-        //           *self.name};
+        //           *self.name);
         //    false
         //}
         //else { bounded }