visitFieldDeclaration method
Record the name of field declaration we last encountered before seeing the Intl.message call.
Implementation
@override
void visitFieldDeclaration(FieldDeclaration node) {
// We don't support names in list declarations,
// e.g. String first, second = Intl.message(...);
setFields(
name: node.fields.variables.length == 1
? node.fields.variables.first.name.lexeme
: null,
documentation: node.documentationComment,
);
super.visitFieldDeclaration(node);
resetFields();
}