visitFunctionDeclaration method
Implementation
@override
visitFunctionDeclaration(FunctionDeclaration node) {
// Always evaluate and add the function to current context
// This allows Global code to overwrite Import functions, which is the correct
// JavaScript behavior (shadowing parent scope functions).
JavascriptFunction newFunc = visitFunctionNode(node.function);
addToThisContext(node.function.name!, newFunc);
return newFunc;
}