loopReplacer method
dynamic
loopReplacer(
- dynamic match,
- dynamic s,
- dynamic e,
- dynamic snippet,
Implementation
loopReplacer(match, s, e, snippet) {
var string = '';
int start = int.parse(s);
int end = int.parse(e);
for (var i = start; i < end; i++) {
snippet = snippet
..replaceAll(RegExp(r"\[\s*i\s*\]"), '[ $i ]')
..replaceAll(RegExp(r"UNROLLED_LOOP_INDEX"), i);
string += snippet;
}
return string;
}