resolveFunction method
Implementation
void resolveFunction(Stmt.Functional function, FunctionType type) {
FunctionType enclosingFunctionType = currentFunctionType;
currentFunctionType = type;
beginScope();
for (Token param in function.params) {
declare(param);
define(param);
}
for (Token param in function.namedParams.keys) {
declare(param);
define(param);
}
resolve(function.body);
endScope();
currentFunctionType = enclosingFunctionType;
}