diff options
| author | Paul Stansifer <paul.stansifer@gmail.com> | 2011-08-10 15:38:41 -0700 |
|---|---|---|
| committer | Paul Stansifer <paul.stansifer@gmail.com> | 2011-08-15 15:35:27 -0700 |
| commit | d2f9b150529384e29db337bcdd37a72b797f6aae (patch) | |
| tree | 1690a21a2b01d3ce9643c21f23c95ca7d1cce9b7 /src/comp/syntax | |
| parent | b8033260632de3963909c22e325e48253c42bb73 (diff) | |
| download | rust-d2f9b150529384e29db337bcdd37a72b797f6aae.tar.gz rust-d2f9b150529384e29db337bcdd37a72b797f6aae.zip | |
Rename a field (so that macros can mention it).
Diffstat (limited to 'src/comp/syntax')
| -rw-r--r-- | src/comp/syntax/ast.rs | 2 | ||||
| -rw-r--r-- | src/comp/syntax/fold.rs | 2 | ||||
| -rw-r--r-- | src/comp/syntax/parse/parser.rs | 2 | ||||
| -rw-r--r-- | src/comp/syntax/print/pprust.rs | 2 | ||||
| -rw-r--r-- | src/comp/syntax/visit.rs | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/comp/syntax/ast.rs b/src/comp/syntax/ast.rs index 152fb38157c..5e6b5f7756a 100644 --- a/src/comp/syntax/ast.rs +++ b/src/comp/syntax/ast.rs @@ -269,7 +269,7 @@ type decl = spanned[decl_]; tag decl_ { decl_local([@local]); decl_item(@item); } -type arm = {pats: [@pat], block: blk}; +type arm = {pats: [@pat], body: blk}; type field_ = {mut: mutability, ident: ident, expr: @expr}; diff --git a/src/comp/syntax/fold.rs b/src/comp/syntax/fold.rs index 96e20918a5b..180a518105f 100644 --- a/src/comp/syntax/fold.rs +++ b/src/comp/syntax/fold.rs @@ -268,7 +268,7 @@ fn noop_fold_stmt(s: &stmt_, fld: ast_fold) -> stmt_ { fn noop_fold_arm(a: &arm, fld: ast_fold) -> arm { ret {pats: ivec::map(fld.fold_pat, a.pats), - block: fld.fold_block(a.block)}; + body: fld.fold_block(a.body)}; } fn noop_fold_pat(p: &pat_, fld: ast_fold) -> pat_ { diff --git a/src/comp/syntax/parse/parser.rs b/src/comp/syntax/parse/parser.rs index 7f8a3aae0bf..9fdb2a0d38e 100644 --- a/src/comp/syntax/parse/parser.rs +++ b/src/comp/syntax/parse/parser.rs @@ -1356,7 +1356,7 @@ fn parse_alt_expr(p: &parser) -> @ast::expr { while p.peek() != token::RBRACE { let pats = parse_pats(p); let blk = parse_block(p); - arms += ~[{pats: pats, block: blk}]; + arms += ~[{pats: pats, body: blk}]; } let hi = p.get_hi_pos(); p.bump(); diff --git a/src/comp/syntax/print/pprust.rs b/src/comp/syntax/print/pprust.rs index 98e91a7f41f..59781bdbfba 100644 --- a/src/comp/syntax/print/pprust.rs +++ b/src/comp/syntax/print/pprust.rs @@ -863,7 +863,7 @@ fn print_expr(s: &ps, expr: &@ast::expr) { print_pat(s, p); } space(s.s); - print_possibly_embedded_block(s, arm.block, false, + print_possibly_embedded_block(s, arm.body, false, alt_indent_unit); } bclose_(s, expr.span, alt_indent_unit); diff --git a/src/comp/syntax/visit.rs b/src/comp/syntax/visit.rs index 735daf0b1b4..e0a5bebd256 100644 --- a/src/comp/syntax/visit.rs +++ b/src/comp/syntax/visit.rs @@ -347,7 +347,7 @@ fn visit_expr[E](ex: &@expr, e: &E, v: &vt[E]) { fn visit_arm[E](a: &arm, e: &E, v: &vt[E]) { for p: @pat in a.pats { v.visit_pat(p, e, v); } - v.visit_block(a.block, e, v); + v.visit_block(a.body, e, v); } // Simpler, non-context passing interface. Always walks the whole tree, simply |
