@@ -615,9 +615,7 @@ fn print_if(s: &ps, test: &@ast::expr, blk: &ast::blk,
615
615
cbox ( s, indent_unit - 1 u) ;
616
616
ibox ( s, 0 u) ;
617
617
word ( s. s , " else if " ) ;
618
- popen ( s) ;
619
618
print_expr ( s, i) ;
620
- pclose ( s) ;
621
619
space ( s. s ) ;
622
620
print_block ( s, t) ;
623
621
do_else ( s, e) ;
@@ -775,19 +773,13 @@ fn print_expr(s: &ps, expr: &@ast::expr) {
775
773
}
776
774
ast:: expr_for ( decl, expr, blk) {
777
775
head ( s, "for" ) ;
778
- print_for_decl ( s, decl) ;
779
- space ( s. s ) ;
780
- word_space ( s, "in" ) ;
781
- print_expr ( s, expr) ;
776
+ print_for_decl ( s, decl, expr) ;
782
777
space ( s. s ) ;
783
778
print_block ( s, blk) ;
784
779
}
785
780
ast:: expr_for_each ( decl, expr, blk) {
786
781
head ( s, "for each" ) ;
787
- print_for_decl ( s, decl) ;
788
- space ( s. s ) ;
789
- word_space ( s, "in" ) ;
790
- print_expr ( s, expr) ;
782
+ print_for_decl ( s, decl, expr) ;
791
783
space ( s. s ) ;
792
784
print_block ( s, blk) ;
793
785
}
@@ -1043,13 +1035,15 @@ fn print_decl(s: &ps, decl: &@ast::decl) {
1043
1035
1044
1036
fn print_ident ( s : & ps , ident : & ast:: ident ) { word ( s. s , ident) ; }
1045
1037
1046
- fn print_for_decl ( s : & ps , loc : @ast:: local ) {
1038
+ fn print_for_decl ( s : & ps , loc : & @ast:: local , coll : & @ast :: expr ) {
1047
1039
word ( s. s , loc. node . ident ) ;
1048
1040
alt loc. node . ty {
1049
1041
some ( t) { word_space ( s, ":" ) ; print_type ( s, * t) ; }
1050
1042
none. { }
1051
1043
}
1052
1044
space ( s. s ) ;
1045
+ word_space ( s, "in" ) ;
1046
+ print_expr ( s, coll) ;
1053
1047
}
1054
1048
1055
1049
fn print_path ( s : & ps , path : & ast:: path ) {
0 commit comments