diff options
| author | bors <bors@rust-lang.org> | 2013-08-01 22:10:45 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-08-01 22:10:45 -0700 |
| commit | bbcce8d95c582d3f918fe4e978d6a715efd991e9 (patch) | |
| tree | 6c0a714130897160fc6ef8a3d17671aed2bc8b90 /src/libsyntax/ext/tt/macro_parser.rs | |
| parent | ecefeb03ccecdcb306e5cc3c76b04670073a82fa (diff) | |
| parent | 234acad404535868ecd7f5b48c3e120c4ea559c9 (diff) | |
auto merge of #8216 : thestinger/rust/range, r=huonw
Diffstat (limited to 'src/libsyntax/ext/tt/macro_parser.rs')
| -rw-r--r-- | src/libsyntax/ext/tt/macro_parser.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/ext/tt/macro_parser.rs b/src/libsyntax/ext/tt/macro_parser.rs index ad26d7b3f7e..982e605af22 100644 --- a/src/libsyntax/ext/tt/macro_parser.rs +++ b/src/libsyntax/ext/tt/macro_parser.rs @@ -21,7 +21,6 @@ use parse::token::{Token, EOF, to_str, nonterminal, get_ident_interner, ident_to use parse::token; use std::hashmap::HashMap; -use std::uint; use std::vec; /* This is an Earley-like parser, without support for in-grammar nonterminals, @@ -280,7 +279,7 @@ pub fn parse( // most of the time. // Only touch the binders we have actually bound - for uint::range(ei.match_lo, ei.match_hi) |idx| { + foreach idx in range(ei.match_lo, ei.match_hi) { let sub = ei.matches[idx].clone(); new_pos.matches[idx] .push(@matched_seq(sub, @@ -321,7 +320,7 @@ pub fn parse( let mut new_ei = ei.clone(); new_ei.idx += 1u; //we specifically matched zero repeats. - for uint::range(match_idx_lo, match_idx_hi) |idx| { + foreach idx in range(match_idx_lo, match_idx_hi) { new_ei.matches[idx].push(@matched_seq(~[], sp)); } |
