visitFieldDeclaration method

void visitFieldDeclaration(
  1. FieldDeclaration node
)
override

Record the name of field declaration we last encountered before seeing the Intl.message call.

Implementation

void visitFieldDeclaration(FieldDeclaration node) {
  // We don't support names in list declarations,
  // e.g. String first, second = Intl.message(...);
  if (node.fields.variables.length == 1) {
    name = node.fields.variables.first.name.lexeme;
  } else {
    name = '';
  }
  parameters = _emptyParameterList;
  super.visitFieldDeclaration(node);
  name = '';
  parameters = null;
}