diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2013-08-01 18:35:46 -0400 | 
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2013-08-02 00:51:14 -0400 | 
| commit | 234acad404535868ecd7f5b48c3e120c4ea559c9 (patch) | |
| tree | 30aa039dafab71ca92ba8ecd0d52dc1cc559c85e /src/libsyntax/ext/tt/macro_parser.rs | |
| parent | 5890fcf87295d5b7a8f4ffa8d9918f755f72baf8 (diff) | |
| download | rust-234acad404535868ecd7f5b48c3e120c4ea559c9.tar.gz rust-234acad404535868ecd7f5b48c3e120c4ea559c9.zip | |
replace `range` with an external iterator
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)); } | 
