getWordCases method
Implementation
Map<int, Message> getWordCases(List<Node> parts, List<String> arguments) {
final wordCases = parts
.where((node) => node.children[0].type == ST.identifier)
.where((node) => numbers.containsKey(node.children[0].value))
.map((node) => getPluralCaseFrom(
numbers[node.children[0].value!]!,
node,
arguments,
))
.whereType<MapEntry<int, Message>>();
return Map.fromEntries(wordCases);
}