visitAnonymousExpr method
Implementation
@override
void visitAnonymousExpr(Expr.Anonymous expr) {
// declare(expr.name);
// define(expr.name);
FunctionType enclosingFunctionType = currentFunctionType;
currentFunctionType = FunctionType.FUNCTION;
beginScope();
for (Token param in expr.params) {
declare(param);
define(param);
}
resolve(expr.body);
endScope();
currentFunctionType = enclosingFunctionType;
}