about summary refs log tree commit diff
path: root/src/libsyntax/ext/pipes
diff options
context:
space:
mode:
authorErick Tryzelaar <erick.tryzelaar@gmail.com>2013-01-15 13:51:43 -0800
committerTim Chevalier <chevalier@alum.wellesley.edu>2013-01-20 14:08:18 -0800
commit8a3a1fc1489fb1f313fdd75af4e73a6a3b271ce2 (patch)
tree3971b94fa8dea80685cce5c2894763b9f350a5d4 /src/libsyntax/ext/pipes
parent1280a64089358d679e010e48dcd18a3d6657d52e (diff)
downloadrust-8a3a1fc1489fb1f313fdd75af4e73a6a3b271ce2.tar.gz
rust-8a3a1fc1489fb1f313fdd75af4e73a6a3b271ce2.zip
convert ast::expr into a struct
Diffstat (limited to 'src/libsyntax/ext/pipes')
-rw-r--r--src/libsyntax/ext/pipes/ast_builder.rs30
1 files changed, 18 insertions, 12 deletions
diff --git a/src/libsyntax/ext/pipes/ast_builder.rs b/src/libsyntax/ext/pipes/ast_builder.rs
index 19cbf833c0f..8472e61c196 100644
--- a/src/libsyntax/ext/pipes/ast_builder.rs
+++ b/src/libsyntax/ext/pipes/ast_builder.rs
@@ -122,17 +122,21 @@ impl ext_ctxt: ext_ctxt_ast_builder {
     }
 
     fn block_expr(b: ast::blk) -> @ast::expr {
-        @{id: self.next_id(),
-          callee_id: self.next_id(),
-          node: ast::expr_block(b),
-          span: dummy_sp()}
+        @expr {
+            id: self.next_id(),
+            callee_id: self.next_id(),
+            node: ast::expr_block(b),
+            span: dummy_sp(),
+        }
     }
 
     fn move_expr(e: @ast::expr) -> @ast::expr {
-        @{id: self.next_id(),
-          callee_id: self.next_id(),
-          node: ast::expr_unary_move(e),
-          span: e.span}
+        @expr {
+            id: self.next_id(),
+            callee_id: self.next_id(),
+            node: ast::expr_unary_move(e),
+            span: e.span,
+        }
     }
 
     fn stmt_expr(e: @ast::expr) -> @ast::stmt {
@@ -153,10 +157,12 @@ impl ext_ctxt: ext_ctxt_ast_builder {
     }
 
     fn rec(+fields: ~[ast::field]) -> @ast::expr {
-        @{id: self.next_id(),
-          callee_id: self.next_id(),
-          node: ast::expr_rec(fields, None),
-          span: dummy_sp()}
+        @expr {
+            id: self.next_id(),
+            callee_id: self.next_id(),
+            node: ast::expr_rec(fields, None),
+            span: dummy_sp(),
+        }
     }
 
     fn ty_field_imm(name: ident, ty: @ast::Ty) -> ast::ty_field {