highestParameter static method
The highest #n used in source, 0 when none.
Implementation
static int highestParameter(String source) {
var highest = 0;
for (final m in RegExp(r'#([1-9])').allMatches(source)) {
final n = int.parse(m[1]!);
if (n > highest) highest = n;
}
return highest;
}