operator []= method
The AST node will have the attribute names as strings, so we translate between those and the fields of the class.
Implementation
void operator []=(String attributeName, value) {
switch (attributeName) {
case "desc":
description = value;
return;
case "examples":
examples = value as Map<String, dynamic>;
return;
case "name":
name = value;
return;
// We use the actual args from the parser rather than what's given in the
// arguments to Intl.message.
case "args":
return;
case "meaning":
meaning = value;
return;
case "locale":
locale = value;
return;
case "skip":
skip = value as bool;
return;
default:
return;
}
}