@@ -76,12 +76,12 @@ pub trait AstBuilder {
76
76
fn stmt_let ( & self , sp : span , mutbl : bool , ident : ast:: ident , ex : @ast:: expr ) -> @ast:: stmt ;
77
77
78
78
// blocks
79
- fn blk ( & self , span : span , stmts : ~[ @ast:: stmt ] , expr : Option < @ast:: expr > ) -> ast:: Block ;
80
- fn blk_expr ( & self , expr : @ast:: expr ) -> ast:: Block ;
81
- fn blk_all ( & self , span : span ,
82
- view_items : ~[ ast:: view_item ] ,
83
- stmts : ~[ @ast:: stmt ] ,
84
- expr : Option < @ast:: expr > ) -> ast:: Block ;
79
+ fn block ( & self , span : span , stmts : ~[ @ast:: stmt ] , expr : Option < @ast:: expr > ) -> ast:: Block ;
80
+ fn block_expr ( & self , expr : @ast:: expr ) -> ast:: Block ;
81
+ fn block_all ( & self , span : span ,
82
+ view_items : ~[ ast:: view_item ] ,
83
+ stmts : ~[ @ast:: stmt ] ,
84
+ expr : Option < @ast:: expr > ) -> ast:: Block ;
85
85
86
86
// expressions
87
87
fn expr ( & self , span : span , node : ast:: expr_ ) -> @ast:: expr ;
@@ -105,7 +105,7 @@ pub trait AstBuilder {
105
105
fn expr_method_call ( & self , span : span ,
106
106
expr : @ast:: expr , ident : ast:: ident ,
107
107
args : ~[ @ast:: expr ] ) -> @ast:: expr ;
108
- fn expr_blk ( & self , b : ast:: Block ) -> @ast:: expr ;
108
+ fn expr_block ( & self , b : ast:: Block ) -> @ast:: expr ;
109
109
110
110
fn field_imm ( & self , span : span , name : ident , e : @ast:: expr ) -> ast:: Field ;
111
111
fn expr_struct ( & self , span : span , path : ast:: Path , fields : ~[ ast:: Field ] ) -> @ast:: expr ;
@@ -387,18 +387,18 @@ impl AstBuilder for @ExtCtxt {
387
387
@respan ( sp, ast:: stmt_decl ( @decl, self . next_id ( ) ) )
388
388
}
389
389
390
- fn blk ( & self , span : span , stmts : ~[ @ast:: stmt ] , expr : Option <@expr>) -> ast:: Block {
391
- self . blk_all ( span, ~[ ] , stmts, expr)
390
+ fn block ( & self , span : span , stmts : ~[ @ast:: stmt ] , expr : Option <@expr>) -> ast:: Block {
391
+ self . block_all ( span, ~[ ] , stmts, expr)
392
392
}
393
393
394
- fn blk_expr ( & self , expr : @ast:: expr ) -> ast:: Block {
395
- self . blk_all ( expr. span , ~[ ] , ~[ ] , Some ( expr) )
394
+ fn block_expr ( & self , expr : @ast:: expr ) -> ast:: Block {
395
+ self . block_all ( expr. span , ~[ ] , ~[ ] , Some ( expr) )
396
396
}
397
- fn blk_all ( & self ,
398
- span : span ,
399
- view_items : ~[ ast:: view_item ] ,
400
- stmts : ~[ @ast:: stmt ] ,
401
- expr : Option < @ast:: expr > ) -> ast:: Block {
397
+ fn block_all ( & self ,
398
+ span : span ,
399
+ view_items : ~[ ast:: view_item ] ,
400
+ stmts : ~[ @ast:: stmt ] ,
401
+ expr : Option < @ast:: expr > ) -> ast:: Block {
402
402
ast:: Block {
403
403
view_items : view_items,
404
404
stmts : stmts,
@@ -474,7 +474,7 @@ impl AstBuilder for @ExtCtxt {
474
474
self . expr ( span,
475
475
ast:: expr_method_call ( self . next_id ( ) , expr, ident, ~[ ] , args, ast:: NoSugar ) )
476
476
}
477
- fn expr_blk ( & self , b : ast:: Block ) -> @ast:: expr {
477
+ fn expr_block ( & self , b : ast:: Block ) -> @ast:: expr {
478
478
self . expr ( b. span , ast:: expr_block ( b) )
479
479
}
480
480
fn field_imm ( & self , span : span , name : ident , e : @ast:: expr ) -> ast:: Field {
@@ -577,7 +577,7 @@ impl AstBuilder for @ExtCtxt {
577
577
ast:: arm {
578
578
pats : pats,
579
579
guard : None ,
580
- body : self . blk_expr ( expr)
580
+ body : self . block_expr ( expr)
581
581
}
582
582
}
583
583
@@ -591,8 +591,8 @@ impl AstBuilder for @ExtCtxt {
591
591
592
592
fn expr_if ( & self , span : span ,
593
593
cond : @ast:: expr , then : @ast:: expr , els : Option < @ast:: expr > ) -> @ast:: expr {
594
- let els = els. map ( |x| self . expr_blk ( self . blk_expr ( * x) ) ) ;
595
- self . expr ( span, ast:: expr_if ( cond, self . blk_expr ( then) , els) )
594
+ let els = els. map ( |x| self . expr_block ( self . block_expr ( * x) ) ) ;
595
+ self . expr ( span, ast:: expr_if ( cond, self . block_expr ( then) , els) )
596
596
}
597
597
598
598
fn lambda_fn_decl ( & self , span : span , fn_decl : ast:: fn_decl , blk : ast:: Block ) -> @ast:: expr {
@@ -618,23 +618,23 @@ impl AstBuilder for @ExtCtxt {
618
618
}
619
619
620
620
fn lambda_expr ( & self , span : span , ids : ~[ ast:: ident ] , expr : @ast:: expr ) -> @ast:: expr {
621
- self . lambda ( span, ids, self . blk_expr ( expr) )
621
+ self . lambda ( span, ids, self . block_expr ( expr) )
622
622
}
623
623
fn lambda_expr_0 ( & self , span : span , expr : @ast:: expr ) -> @ast:: expr {
624
- self . lambda0 ( span, self . blk_expr ( expr) )
624
+ self . lambda0 ( span, self . block_expr ( expr) )
625
625
}
626
626
fn lambda_expr_1 ( & self , span : span , expr : @ast:: expr , ident : ast:: ident ) -> @ast:: expr {
627
- self . lambda1 ( span, self . blk_expr ( expr) , ident)
627
+ self . lambda1 ( span, self . block_expr ( expr) , ident)
628
628
}
629
629
630
630
fn lambda_stmts ( & self , span : span , ids : ~[ ast:: ident ] , stmts : ~[ @ast:: stmt ] ) -> @ast:: expr {
631
- self . lambda ( span, ids, self . blk ( span, stmts, None ) )
631
+ self . lambda ( span, ids, self . block ( span, stmts, None ) )
632
632
}
633
633
fn lambda_stmts_0 ( & self , span : span , stmts : ~[ @ast:: stmt ] ) -> @ast:: expr {
634
- self . lambda0 ( span, self . blk ( span, stmts, None ) )
634
+ self . lambda0 ( span, self . block ( span, stmts, None ) )
635
635
}
636
636
fn lambda_stmts_1 ( & self , span : span , stmts : ~[ @ast:: stmt ] , ident : ast:: ident ) -> @ast:: expr {
637
- self . lambda1 ( span, self . blk ( span, stmts, None ) , ident)
637
+ self . lambda1 ( span, self . block ( span, stmts, None ) , ident)
638
638
}
639
639
640
640
fn arg ( & self , span : span , ident : ast:: ident , ty : ast:: Ty ) -> ast:: arg {
0 commit comments