lookForPluralOrGender method

void lookForPluralOrGender(
  1. InterpolationExpression node
)

Implementation

void lookForPluralOrGender(InterpolationExpression node) {
  var visitor = PluralAndGenderVisitor(
    pieces,
    message as ComplexMessage,
    extraction,
  );
  node.accept(visitor);
  if (!visitor.foundPluralOrGender) {
    throw MessageExtractionException(
        'Only simple identifiers and Intl.plural/gender/select expressions '
        'are allowed in message '
        'interpolation expressions.\nError at $node');
  }
}