1
Fork 0

for x in range(a, b) -> for x in a..b

sed -i 's/in range(\([^,]*\), *\([^()]*\))/in \1\.\.\2/g' **/*.rs
This commit is contained in:
Jorge Aparicio 2015-01-26 15:46:12 -05:00
parent c300d681bd
commit 7d661af9c8
155 changed files with 490 additions and 490 deletions

View file

@ -339,7 +339,7 @@ pub fn parse(sess: &ParseSess,
// most of the time.
// Only touch the binders we have actually bound
for idx in range(ei.match_lo, ei.match_hi) {
for idx in ei.match_lo..ei.match_hi {
let sub = (ei.matches[idx]).clone();
(&mut new_pos.matches[idx])
.push(Rc::new(MatchedSeq(sub, mk_sp(ei.sp_lo,
@ -385,7 +385,7 @@ pub fn parse(sess: &ParseSess,
new_ei.match_cur += seq.num_captures;
new_ei.idx += 1us;
//we specifically matched zero repeats.
for idx in range(ei.match_cur, ei.match_cur + seq.num_captures) {
for idx in ei.match_cur..ei.match_cur + seq.num_captures {
(&mut new_ei.matches[idx]).push(Rc::new(MatchedSeq(vec![], sp)));
}
@ -495,7 +495,7 @@ pub fn parse(sess: &ParseSess,
}
cur_eis.push(ei);
for _ in range(0, rust_parser.tokens_consumed) {
for _ in 0..rust_parser.tokens_consumed {
let _ = rdr.next_token();
}
}