summary refs log tree commit diff
path: root/src/libsyntax/print/pp.rs
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2012-08-06 12:34:08 -0700
committerBrian Anderson <banderson@mozilla.com>2012-08-06 15:36:30 -0700
commitecaf9e39c9435fa2de4fe393c4b263be36eb2d99 (patch)
tree775f69be65adff65551d96173dd797e32e2c3157 /src/libsyntax/print/pp.rs
parentd3a9bb1bd4a1d510bbaca2ab1121e4c85a239247 (diff)
downloadrust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.tar.gz
rust-ecaf9e39c9435fa2de4fe393c4b263be36eb2d99.zip
Convert alt to match. Stop parsing alt
Diffstat (limited to 'src/libsyntax/print/pp.rs')
-rw-r--r--src/libsyntax/print/pp.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/libsyntax/print/pp.rs b/src/libsyntax/print/pp.rs
index 12ef7149f6b..a8f9cf756a8 100644
--- a/src/libsyntax/print/pp.rs
+++ b/src/libsyntax/print/pp.rs
@@ -62,7 +62,7 @@ type begin_t = {offset: int, breaks: breaks};
 enum token { STRING(@~str, int), BREAK(break_t), BEGIN(begin_t), END, EOF, }
 
 fn tok_str(++t: token) -> ~str {
-    alt t {
+    match t {
       STRING(s, len) => return fmt!{"STR(%s,%d)", *s, len},
       BREAK(_) => return ~"BREAK",
       BEGIN(_) => return ~"BEGIN",
@@ -238,7 +238,7 @@ impl printer for printer {
     fn replace_last_token(t: token) { self.token[self.right] = t; }
     fn pretty_print(t: token) {
         debug!{"pp ~[%u,%u]", self.left, self.right};
-        alt t {
+        match t {
           EOF => {
             if !self.scan_stack_empty {
                 self.check_stack(0);
@@ -357,7 +357,7 @@ impl printer for printer {
                self.left, L};
         if L >= 0 {
             self.print(x, L);
-            alt x {
+            match x {
               BREAK(b) => self.left_total += b.blank_space,
               STRING(_, len) => { assert (len == L); self.left_total += len; }
               _ => ()
@@ -373,7 +373,7 @@ impl printer for printer {
     fn check_stack(k: int) {
         if !self.scan_stack_empty {
             let x = self.scan_top();
-            alt copy self.token[x] {
+            match copy self.token[x] {
               BEGIN(b) => {
                 if k > 0 {
                     self.size[self.scan_pop()] = self.size[x] +
@@ -422,7 +422,7 @@ impl printer for printer {
         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));
-        alt x {
+        match x {
           BEGIN(b) => {
             if L > self.space {
                 let col = self.margin - self.space + b.offset;
@@ -442,7 +442,7 @@ impl printer for printer {
           }
           BREAK(b) => {
             let top = self.get_top();
-            alt top.pbreak {
+            match top.pbreak {
               fits => {
                 debug!{"print BREAK in fitting block"};
                 self.space -= b.blank_space;