loopReplacer method
dynamic
loopReplacer(
- dynamic match,
- dynamic start,
- dynamic end,
- dynamic snippet,
Implementation
loopReplacer(match, start, end, snippet) {
var string = '';
int _start = int.parse(start);
int _end = int.parse(end);
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;
}