visitTopLevelVariableDeclaration method
void
visitTopLevelVariableDeclaration(
- TopLevelVariableDeclaration node
override
Record the name of the top level variable declaration we last encountered before seeing the Intl.message call.
Implementation
void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
// We don't support names in list declarations,
// e.g. String first, second = Intl.message(...);
if (node.variables.variables.length == 1) {
name = node.variables.variables.first.name.lexeme;
} else {
name = '';
}
parameters = _emptyParameterList;
super.visitTopLevelVariableDeclaration(node);
name = '';
parameters = null;
}