operator []= method
When we create these from strings or from AST nodes, we want to look up and set their attributes by string names, so we override the indexing operators so that they behave like maps with respect to those attribute names.
Implementation
@override
void operator []=(String attributeName, rawValue) {
var value = Message.from(rawValue, this);
if (validSelectKey.stringMatch(attributeName) == attributeName) {
cases[attributeName] = value;
} else {
throw IntlMessageExtractionException(
"Invalid select keyword: '$attributeName', must "
"match '$selectPattern'",
);
}
}