parse method
Implementation
PluralMessage parse(Node node, List<String> arguments,
[bool addId = false, String? name]) {
final identifier = node.children
.firstWhere((element) => element.type == ST.identifier)
.value!;
if (!arguments.contains(identifier)) arguments.add(identifier);
final parts = node.children
.firstWhere((element) => element.type == ST.pluralParts)
.children;
final numberCases = getNumberCases(parts, arguments);
final wordCases = getWordCases(parts, arguments);
return PluralMessage(
numberCases: numberCases,
wordCases: wordCases,
few: getNamed(parts, 'few', arguments),
many: getNamed(parts, 'many', arguments),
other: getOther(parts, arguments)!,
argIndex: arguments.indexOf(identifier),
id: addId ? name : null,
);
}