diff options
| author | Marijn Haverbeke <[email protected]> | 2011-05-11 15:10:24 +0200 |
|---|---|---|
| committer | Marijn Haverbeke <[email protected]> | 2011-05-11 15:10:24 +0200 |
| commit | 5405f45274dc6dce53743092dc0679a5f43482d9 (patch) | |
| tree | d1417d56ca0770e3cbf7abf1273ed1f2fce3fe4c /src/comp/front/parser.rs | |
| parent | Stop depending on block indices in capture.rs (diff) | |
| download | rust-5405f45274dc6dce53743092dc0679a5f43482d9.tar.xz rust-5405f45274dc6dce53743092dc0679a5f43482d9.zip | |
Get rid of block indices
Diffstat (limited to 'src/comp/front/parser.rs')
| -rw-r--r-- | src/comp/front/parser.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index 46cad2fd..69f0e054 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -1626,15 +1626,6 @@ fn parse_source_stmt(parser p) -> @ast.stmt { fail; } -fn index_block(parser p, vec[@ast.stmt] stmts, Option.t[@ast.expr] expr) - -> ast.block_ { - auto index = new_str_hash[ast.block_index_entry](); - for (@ast.stmt s in stmts) { - ast.index_stmt(index, s); - } - ret rec(stmts=stmts, expr=expr, index=index, a=p.get_ann()); -} - fn index_arm(@ast.pat pat) -> hashmap[ast.ident,ast.def_id] { fn do_index_arm(&hashmap[ast.ident,ast.def_id] index, @ast.pat pat) { alt (pat.node) { @@ -1770,7 +1761,7 @@ fn parse_block(parser p) -> ast.block { auto hi = p.get_hi_pos(); p.bump(); - auto bloc = index_block(p, stmts, expr); + auto bloc = rec(stmts=stmts, expr=expr, a=p.get_ann()); ret spanned[ast.block_](lo, hi, bloc); } |