attachProperties function
void
attachProperties(
- Iterable<
RegExpMatch> match, - Map<
String, dynamic> location, - dynamic names,
- dynamic rawName,
Implementation
void attachProperties(Iterable<RegExpMatch> match,
Map<String, dynamic> location, names, rawName) {
if ((rawName != null && rawName.length > 0) &&
(names == null || names.length == 0)) {
match.forEach((m) {
assert(rawName != null);
location[rawName] = toIntIfInt(m.groupCount == 0 ? m.input : m.group(1));
});
} else {
match.forEach((m) {
for (var i = 0; i < m.groupCount; i++) {
assert(names[i] != null);
location[names[i].toString()] = toIntIfInt(m.group(i + 1));
}
});
}
}