visitFunctionDeclaration method
Implementation
@override
void visitFunctionDeclaration(FunctionDeclaration node) {
if (!node.isSetter && node.returnType == null) {
reportToken(
node.name2,
message:
"The function ${node.name2.lexeme} should have a return type but doesn't.",
correction: 'Try adding a return type to the function.',
);
}
}